Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
eb7e1d0f
提交
eb7e1d0f
authored
11月 06, 2008
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
--no commit message
上级
baefd062
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
88 行增加
和
17 行删除
+88
-17
changelog.html
h2/src/docsrc/html/changelog.html
+8
-1
links.html
h2/src/docsrc/html/links.html
+5
-0
roadmap.html
h2/src/docsrc/html/roadmap.html
+1
-0
tutorial.html
h2/src/docsrc/html/tutorial.html
+27
-0
Command.java
h2/src/main/org/h2/command/Command.java
+5
-1
Value.java
h2/src/main/org/h2/value/Value.java
+3
-3
TestAll.java
h2/src/test/org/h2/test/TestAll.java
+6
-1
TestMultiThreaded.java
h2/src/test/org/h2/test/synth/TestMultiThreaded.java
+31
-10
dictionary.txt
h2/src/tools/org/h2/build/doc/dictionary.txt
+2
-1
没有找到文件。
h2/src/docsrc/html/changelog.html
浏览文件 @
eb7e1d0f
...
...
@@ -18,7 +18,14 @@ Change Log
<h1>
Change Log
</h1>
<h2>
Next Version (unreleased)
</h2>
<ul><li>
ALTER TABLE used a lot of memory when using multi-version concurrency.
<ul><li>
Could not order by a formula when the formula was in the group by list
but not in the select list.
</li><li>
Date values that match the daylight saving time end were not allowed in
times zones were the daylight saving time ends at midnight, for years larger than 2037.
Example: timezone Brasilia, date 2042-10-12. This is a problem of Java, however a
workaround is implemented in H2 that solves most problems (except the problems of
java.sql.Date itself).
</li><li>
ALTER TABLE used a lot of memory when using multi-version concurrency.
</li><li>
Referential integrity for in-memory databases didn't work in some cases in version 1.1.102.
</li><li>
New column INFORMATION_SCHEMA.COLUMNS.SEQUENCE_NAME to get the name
of the sequence for auto-increment columns.
...
...
h2/src/docsrc/html/links.html
浏览文件 @
eb7e1d0f
...
...
@@ -437,6 +437,11 @@ SeQuaLite</a><br />
A free, light-weight, java data access framework released under GPL.
</p>
<p><a
href=
"http://code.google.com/p/shapelogic/"
>
ShapeLogic
</a><br
/>
Toolkit for declarative programming, image processing and computer vision.
</p>
<p><a
href=
"http://www.shellbook.com"
>
Shellbook
</a><br
/>
Desktop publishing application.
...
...
h2/src/docsrc/html/roadmap.html
浏览文件 @
eb7e1d0f
...
...
@@ -384,6 +384,7 @@ Of course, patches are always welcome, but are not always applied as is. Patches
</li><li>
ANALYZE: Use a bloom filter for each indexed column to estimate count of distinct values.
</li><li>
ANALYZE: For unique indexes that allow null, count the number of null.
</li><li>
AUTO_SERVER: support changing IP addresses (disable a network while the database is open).
</li><li>
Avoid using java.util.Calendar internally because it's slow, complicated, and seems to be buggy.
</li></ul>
<h2>
Not Planned
</h2>
...
...
h2/src/docsrc/html/tutorial.html
浏览文件 @
eb7e1d0f
...
...
@@ -452,6 +452,33 @@ If the server is started within the DbStarter, it will also be stopped automatic
web application is stopped.
</p>
<h3>
Using the H2 Console Servlet
</h3>
<p>
The H2 Console is a standalone application and includes its own web server, but it can be
used as a servlet as well. To do that, include the the h2 jar file in your application, and
add the following configuration to your web.xml:
</p>
<pre>
<
servlet
>
<
servlet-name
>
H2Console
<
/servlet-name
>
<
servlet-class
>
org.h2.server.web.WebServlet
<
/servlet-class
>
<
load-on-startup
>
1
<
/load-on-startup
>
<
/servlet
>
<
servlet-mapping
>
<
servlet-name
>
H2Console
<
/servlet-name
>
<
url-pattern
>
/console/*
<
/url-pattern
>
<
/servlet-mapping
>
</pre>
<p>
For details, see also
<code>
src/tools/WEB-INF/web.xml
</code>
.
</p>
<p>
To create a web application that creates just the H2 Console, run the following command:
</p>
<pre>
build warConsole
</pre>
<br
/><a
name=
"csv"
></a>
<h2>
CSV (Comma Separated Values) Support
</h2>
<p>
...
...
h2/src/main/org/h2/command/Command.java
浏览文件 @
eb7e1d0f
...
...
@@ -215,7 +215,11 @@ public abstract class Command implements CommandInterface {
throw
e
;
}
try
{
database
.
wait
(
100
);
if
(
sync
==
database
)
{
database
.
wait
(
100
);
}
else
{
Thread
.
sleep
(
100
);
}
}
catch
(
InterruptedException
e1
)
{
// ignore
}
...
...
h2/src/main/org/h2/value/Value.java
浏览文件 @
eb7e1d0f
...
...
@@ -742,11 +742,11 @@ public abstract class Value {
case
DECIMAL:
return
ValueDecimal
.
get
(
new
BigDecimal
(
s
.
trim
()));
case
TIME:
return
ValueTime
.
get
(
ValueTime
.
parseTime
(
s
.
trim
()));
return
ValueTime
.
get
NoCopy
(
ValueTime
.
parseTime
(
s
.
trim
()));
case
DATE:
return
ValueDate
.
get
(
ValueDate
.
parseDate
(
s
.
trim
()));
return
ValueDate
.
get
NoCopy
(
ValueDate
.
parseDate
(
s
.
trim
()));
case
TIMESTAMP:
return
ValueTimestamp
.
get
(
ValueTimestamp
.
parseTimestamp
(
s
.
trim
()));
return
ValueTimestamp
.
get
NoCopy
(
ValueTimestamp
.
parseTimestamp
(
s
.
trim
()));
case
BYTES:
return
ValueBytes
.
getNoCopy
(
ByteUtils
.
convertStringToBytes
(
s
.
trim
()));
case
JAVA_OBJECT:
...
...
h2/src/test/org/h2/test/TestAll.java
浏览文件 @
eb7e1d0f
...
...
@@ -283,7 +283,12 @@ java org.h2.test.TestAll timer
fix TODO multithreaded kernel
*.bat, *.sh: maybe can use wildcards
remove old TODO
online backup may not work for very large files
(document problem with jdk 1.4; document to use jar -xf)
split files (2 GB max size)
select last_value from conf.report_id_seq
...
...
h2/src/test/org/h2/test/synth/TestMultiThreaded.java
浏览文件 @
eb7e1d0f
...
...
@@ -31,7 +31,7 @@ public class TestMultiThreaded extends TestBase {
/**
* Processes random operations.
*/
private
static
class
Processor
extends
Thread
{
private
class
Processor
extends
Thread
{
private
int
id
;
private
Statement
stat
;
private
Random
random
;
...
...
@@ -46,18 +46,20 @@ public class TestMultiThreaded extends TestBase {
}
public
void
run
()
{
int
count
=
0
;
ResultSet
rs
;
try
{
int
test
;
while
(!
isInterrupted
())
{
switch
(
random
.
nextInt
(
3
))
{
switch
(
random
.
nextInt
(
6
))
{
case
0
:
//System.out.println("insert " + id + " count: " + count);
// insert a row for this connection
trace
(
"insert "
+
id
+
" count: "
+
count
);
stat
.
execute
(
"INSERT INTO TEST(NAME) VALUES('"
+
id
+
"')"
);
count
++;
break
;
case
1
:
// delete a row for this connection
if
(
count
>
0
)
{
//System.out.println
("delete " + id + " count: " + count);
trace
(
"delete "
+
id
+
" count: "
+
count
);
int
updateCount
=
stat
.
executeUpdate
(
"DELETE FROM TEST WHERE NAME = '"
+
id
+
"' AND ROWNUM()<2"
);
if
(
updateCount
!=
1
)
{
...
...
@@ -67,14 +69,30 @@ int test;
}
break
;
case
2
:
//System.out.println("select " + id + " count: " + count);
ResultSet
rs
=
stat
.
executeQuery
(
"SELECT COUNT(*) FROM TEST WHERE NAME = '"
+
id
+
"'"
);
// select the number of rows of this connection
trace
(
"select "
+
id
+
" count: "
+
count
);
rs
=
stat
.
executeQuery
(
"SELECT COUNT(*) FROM TEST WHERE NAME = '"
+
id
+
"'"
);
rs
.
next
();
int
got
=
rs
.
getInt
(
1
);
if
(
got
!=
count
)
{
throw
new
Error
(
"Expected: "
+
count
+
" got: "
+
got
);
}
break
;
case
3
:
// insert a row
stat
.
execute
(
"INSERT INTO TEST(NAME) VALUES(NULL)"
);
break
;
case
4
:
// delete a row
stat
.
execute
(
"DELETE FROM TEST WHERE NAME IS NULL"
);
break
;
case
5
:
// select rows
rs
=
stat
.
executeQuery
(
"SELECT * FROM TEST WHERE NAME IS NULL"
);
while
(
rs
.
next
())
{
rs
.
getString
(
1
);
}
break
;
}
}
}
catch
(
Throwable
e
)
{
...
...
@@ -85,21 +103,24 @@ int test;
public
void
test
()
throws
Exception
{
if
(
config
.
mvcc
)
{
int
test
;
return
;
}
deleteDb
(
"multiThreaded"
);
int
size
=
getSize
(
2
,
4
);
//int size = 10;
Connection
[]
connList
=
new
Connection
[
size
];
for
(
int
i
=
0
;
i
<
size
;
i
++)
{
connList
[
i
]
=
getConnection
(
"multiThreaded;MULTI_THREADED=1"
);
}
Connection
conn
=
connList
[
0
];
Statement
stat
=
conn
.
createStatement
();
stat
.
execute
(
"CREATE TABLE TEST(ID IDENTITY, NAME VARCHAR)"
);
stat
.
execute
(
"SET LOCK_TIMEOUT 10000"
);
stat
.
execute
(
"CREATE SEQUENCE TEST_SEQ"
);
stat
.
execute
(
"CREATE TABLE TEST(ID BIGINT DEFAULT NEXT VALUE FOR TEST_SEQ, NAME VARCHAR)"
);
// stat.execute("CREATE TABLE TEST(ID IDENTITY, NAME VARCHAR)");
// stat.execute("CREATE INDEX IDX_TEST_NAME ON TEST(NAME)");
Processor
[]
processors
=
new
Processor
[
size
];
for
(
int
i
=
0
;
i
<
size
;
i
++)
{
conn
=
connList
[
i
];
processors
[
i
]
=
new
Processor
(
conn
,
i
);
processors
[
i
].
start
();
}
...
...
h2/src/tools/org/h2/build/doc/dictionary.txt
浏览文件 @
eb7e1d0f
...
...
@@ -568,4 +568,5 @@ classname recaptcha unload unloaded unloads activator statistic hence rathsack
reflects doy bloom minimal gmx conserve panic serious robert thursday
wednesday saturday friday tuesday sharing opposite fassi dario clauses
factorial blogspot displaying thedevcloud dayof safety chrome favorite thumbs
localization olivier hprof jps jstack gpl qua processor
\ No newline at end of file
localization olivier hprof jps jstack gpl qua processor casting brasilia leap
daylight
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论