Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
9b6138bf
提交
9b6138bf
authored
12月 05, 2009
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
--no commit message
上级
2684342d
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
75 行增加
和
6 行删除
+75
-6
changelog.html
h2/src/docsrc/html/changelog.html
+5
-1
roadmap.html
h2/src/docsrc/html/roadmap.html
+2
-1
TestAll.java
h2/src/test/org/h2/test/TestAll.java
+8
-3
TestFullText.java
h2/src/test/org/h2/test/db/TestFullText.java
+58
-1
TestHalt.java
h2/src/test/org/h2/test/synth/TestHalt.java
+1
-0
TestKillRestartMulti.java
h2/src/test/org/h2/test/synth/TestKillRestartMulti.java
+1
-0
没有找到文件。
h2/src/docsrc/html/changelog.html
浏览文件 @
9b6138bf
...
...
@@ -18,7 +18,10 @@ Change Log
<h1>
Change Log
</h1>
<h2>
Next Version (unreleased)
</h2>
<ul><li>
Right outer joins on tables that were already 'inner joined' was processed incorrectly.
<ul><li>
The shell tool now has a very simple statement history.
</li><li>
The zip file system implementation now supports the '~' home directory prefix.
Example database URL: jdbc:h2:zip:~/test.zip!/test
</li><li>
Right outer joins on tables that were already 'inner joined' was processed incorrectly.
</li><li>
Temporary files from LOB objects were not deleted early enough when using the server mode.
</li><li>
Trying to alter a temporary table threw a strange exception.
It is still not possible to do that, but the exception message is better now.
...
...
@@ -38,6 +41,7 @@ Change Log
(only when using compression), the COMPRESS function, and storing CLOB or BLOB data (only when compression is enabled).
</li><li>
The compression algorithm "LZF" is now about 33% faster than before when compressing small block
(around 2 KB). It is much faster than Deflate, but the compression ratio is lower.
Some of the optimizations are from Sam Van Oort, thanks a lot!
</li><li>
Compressing large blocks of data didn't work when using the "Deflate" compression algorithm.
Compressing a lot of data could run out of heap memory.
</li><li>
The test cases don't access the file system directly, this simplifies GAE for Java testing.
...
...
h2/src/docsrc/html/roadmap.html
浏览文件 @
9b6138bf
...
...
@@ -405,6 +405,7 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>
Support INTERVAL data type (see Oracle and others).
</li><li>
Combine Server and Console tool (only keep Server).
</li><li>
Store the Lucene index in the database itself.
</li><li>
Support standard MERGE statement: http://en.wikipedia.org/wiki/Merge_%28SQL%29
</li><li>
Oracle compatibility: support DECODE(x, ...).
</li><li>
Console: Start Browser: if ip number changed, try localhost instead.
</li><li>
MVCC: compare concurrent update behavior with PostgreSQL and Oracle.
...
...
@@ -417,7 +418,6 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>
CACHE_SIZE: automatically use a fraction of Runtime.maxMemory - maybe automatically the second level cache.
</li><li>
Support date/time/timestamp as documented in http://en.wikipedia.org/wiki/ISO_8601
</li><li>
PostgreSQL compatibility: when in PG mode, treat BYTEA data like PG.
</li><li>
Support standard MERGE statement: http://en.wikipedia.org/wiki/Merge_%28SQL%29
</li><li>
MySQL compatibility: REPLACE http://dev.mysql.com/doc/refman/6.0/en/replace.html
</li><li>
Support =ANY(array) as in PostgreSQL.
</li><li>
IBM DB2 compatibility: support PREVIOUS VALUE FOR sequence.
...
...
@@ -465,6 +465,7 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>
Move away from system properties where possible.
</li><li>
Database file lock: detect hibernate / standby / very slow threads (compare system time).
</li><li>
An index on (id, name) should be used for a query: select * from t where s=? order by i
</li><li>
Automatic detection of redundant indexes.
</li></ul>
<h2>
Not Planned
</h2>
...
...
h2/src/test/org/h2/test/TestAll.java
浏览文件 @
9b6138bf
...
...
@@ -297,11 +297,16 @@ java org.h2.test.TestAll timer
/*
TestClob - delete temp files
memory usage:
drop table test;
create table test(username varchar, city varchar);
create index test_user on test(username);
create index test_city on test(city);
insert into test select x || ' user', (x / 20) || ' city' from system_range(1, 500000);
Document Shell tool
reserveMemory no longer needed
Add link to http://groups.google.com/group/h2-cn
Document Shell tool
// System.setProperty("h2.pageSize", "64");
test with small freeList pages, page size 64
...
...
h2/src/test/org/h2/test/db/TestFullText.java
浏览文件 @
9b6138bf
...
...
@@ -12,6 +12,7 @@ import java.sql.PreparedStatement;
import
java.sql.ResultSet
;
import
java.sql.SQLException
;
import
java.sql.Statement
;
import
java.util.Random
;
import
java.util.StringTokenizer
;
import
org.h2.fulltext.FullText
;
import
org.h2.store.fs.FileSystem
;
...
...
@@ -31,11 +32,12 @@ public class TestFullText extends TestBase {
TestBase
.
createCaller
().
init
().
test
();
}
public
void
test
()
throws
SQL
Exception
{
public
void
test
()
throws
Exception
{
testCreateDrop
();
if
(
config
.
memory
)
{
return
;
}
testMultiThreaded
();
testStreamLob
();
test
(
false
,
"VARCHAR"
);
test
(
false
,
"CLOB"
);
...
...
@@ -59,6 +61,61 @@ public class TestFullText extends TestBase {
deleteDb
(
"fullTextReopen"
);
}
public
void
testMultiThreaded
()
throws
Exception
{
deleteDb
(
"fullText"
);
final
boolean
[]
stop
=
new
boolean
[
1
];
final
Exception
[]
exception
=
new
Exception
[
1
];
int
len
=
2
;
Thread
[]
threads
=
new
Thread
[
len
];
for
(
int
i
=
0
;
i
<
len
;
i
++)
{
// final Connection conn = getConnection("fullText;MULTI_THREADED=1;LOCK_TIMEOUT=10000");
final
Connection
conn
=
getConnection
(
"fullText"
);
Statement
stat
=
conn
.
createStatement
();
stat
.
execute
(
"CREATE ALIAS IF NOT EXISTS FT_INIT FOR \"org.h2.fulltext.FullText.init\""
);
stat
.
execute
(
"CALL FT_INIT()"
);
stat
.
execute
(
"CREATE ALIAS IF NOT EXISTS FT_INIT FOR \"org.h2.fulltext.FullText.init\""
);
stat
.
execute
(
"CALL FT_INIT()"
);
final
String
tableName
=
"TEST"
+
i
;
stat
.
execute
(
"CREATE TABLE "
+
tableName
+
"(ID INT PRIMARY KEY, DATA VARCHAR)"
);
FullText
.
createIndex
(
conn
,
"PUBLIC"
,
tableName
,
null
);
threads
[
i
]
=
new
Thread
()
{
public
void
run
()
{
try
{
PreparedStatement
prep
=
conn
.
prepareStatement
(
"INSERT INTO "
+
tableName
+
" VALUES(?, ?)"
);
Random
random
=
new
Random
();
int
x
=
0
;
while
(!
stop
[
0
])
{
StringBuilder
buff
=
new
StringBuilder
();
for
(
int
j
=
0
;
j
<
1000
;
j
++)
{
buff
.
append
(
" "
+
random
.
nextInt
(
10000
));
buff
.
append
(
" x"
+
j
);
}
prep
.
setInt
(
1
,
x
);
prep
.
setString
(
2
,
buff
.
toString
());
prep
.
execute
();
x
++;
}
conn
.
close
();
}
catch
(
SQLException
e
)
{
exception
[
0
]
=
e
;
}
}
};
}
for
(
Thread
t
:
threads
)
{
t
.
start
();
}
Thread
.
sleep
(
1000
);
stop
[
0
]
=
true
;
for
(
Thread
t
:
threads
)
{
t
.
join
();
}
if
(
exception
[
0
]
!=
null
)
{
throw
exception
[
0
];
}
}
private
void
testStreamLob
()
throws
SQLException
{
deleteDb
(
"fullText"
);
Connection
conn
=
getConnection
(
"fullText"
);
...
...
h2/src/test/org/h2/test/synth/TestHalt.java
浏览文件 @
9b6138bf
...
...
@@ -249,6 +249,7 @@ public abstract class TestHalt extends TestBase {
}
controllerWaitAfterAppStart
();
p
.
destroy
();
p
.
waitFor
();
try
{
traceOperation
(
"backing up "
+
sequenceId
);
Backup
.
execute
(
baseDir
+
"/haltSeq"
+
sequenceId
+
".zip"
,
baseDir
,
null
,
true
);
...
...
h2/src/test/org/h2/test/synth/TestKillRestartMulti.java
浏览文件 @
9b6138bf
...
...
@@ -70,6 +70,7 @@ public class TestKillRestartMulti extends TestBase {
Thread
.
sleep
(
sleep
);
printTime
(
"killing: "
+
i
);
p
.
destroy
();
p
.
waitFor
();
break
;
}
else
if
(
s
.
startsWith
(
"#Info"
))
{
// System.out.println("info: " + s);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论