Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
8dc58a75
提交
8dc58a75
authored
5月 11, 2010
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Documentation.
上级
f22ff7e4
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
62 行增加
和
51 行删除
+62
-51
history.html
h2/src/docsrc/html/history.html
+3
-3
TestAll.java
h2/src/test/org/h2/test/TestAll.java
+6
-7
TestBase.java
h2/src/test/org/h2/test/TestBase.java
+1
-1
TestFuzzOptimizations.java
h2/src/test/org/h2/test/synth/TestFuzzOptimizations.java
+51
-39
dictionary.txt
h2/src/tools/org/h2/build/doc/dictionary.txt
+1
-1
没有找到文件。
h2/src/docsrc/html/history.html
浏览文件 @
8dc58a75
...
@@ -88,10 +88,10 @@ Java implementations (such as Swing) are not used, or only used for optional fea
...
@@ -88,10 +88,10 @@ Java implementations (such as Swing) are not used, or only used for optional fea
<h2
id=
"supporters"
>
Supporters
</h2>
<h2
id=
"supporters"
>
Supporters
</h2>
<p>
<p>
Many thanks for those who reported bugs, gave valuable feedback,
Many thanks for those who reported bugs, gave valuable feedback,
spread the word, and translated this project. Also many thanks to the donors who contributed
spread the word, and translated this project. Also many thanks to the donors:
via PayPal:
</p>
</p>
<ul><li><a
href=
"http://www.code42.com"
>
Code 42 Software, Inc., Minneapolis
</a>
<ul><li><a
href=
"http://www.codelutin.com"
>
Code Lutin, France
</a>
</li><li><a
href=
"http://www.code42.com"
>
Code 42 Software, Inc., Minneapolis
</a>
</li><li><a
href=
"http://www.netsuxxess.de"
>
NetSuxxess GmbH, Germany
</a>
</li><li><a
href=
"http://www.netsuxxess.de"
>
NetSuxxess GmbH, Germany
</a>
</li><li><a
href=
"http://pokercopilot.com"
>
Poker Copilot, Steve McLeod, Germany
</a>
</li><li><a
href=
"http://pokercopilot.com"
>
Poker Copilot, Steve McLeod, Germany
</a>
</li><li><a
href=
"http://skycash.com"
>
SkyCash, Poland
</a>
</li><li><a
href=
"http://skycash.com"
>
SkyCash, Poland
</a>
...
...
h2/src/test/org/h2/test/TestAll.java
浏览文件 @
8dc58a75
...
@@ -298,26 +298,25 @@ java org.h2.test.TestAll timer
...
@@ -298,26 +298,25 @@ java org.h2.test.TestAll timer
System
.
setProperty
(
"h2.maxMemoryRowsDistinct"
,
"128"
);
System
.
setProperty
(
"h2.maxMemoryRowsDistinct"
,
"128"
);
System
.
setProperty
(
"h2.check2"
,
"true"
);
System
.
setProperty
(
"h2.check2"
,
"true"
);
// System.setProperty("h2.lobInDatabase", "true");
// System.setProperty("h2.analyzeAuto", "100");
// System.setProperty("h2.syncMethod", "");
// System.setProperty("h2.syncMethod", "");
/*
/*
change or remove documentation for FILE_LOCK=NO
h2.selectForUpdateMvcc:
Implement (sum, count) and test (join, ...)
comparative sql tests
recovery tests with small freeList pages, page size 64
reopen org.h2.test.unit.TestPageStore
reopen org.h2.test.unit.TestPageStore
-Xmx1500m -D reopenOffset=3 -D reopenShift=1
-Xmx1500m -D reopenOffset=3 -D reopenShift=1
test with small freeList pages, page size 64
power failure test
power failure test
power failure test: MULTI_THREADED=TRUE
power failure test: MULTI_THREADED=TRUE
power failure test: larger binaries and additional index.
power failure test: larger binaries and additional index.
power failure test with randomly generating / dropping indexes and tables.
power failure test with randomly generating / dropping indexes and tables.
lob in db: check for memory leaks (temp table with blob, then crash;
crash while truncating a table with a blob)
drop table test;
drop table test;
create table test(id identity, name varchar(100) default space(100));
create table test(id identity, name varchar(100) default space(100));
@LOOP 10 insert into test select null, null from system_range(1, 100000);
@LOOP 10 insert into test select null, null from system_range(1, 100000);
...
...
h2/src/test/org/h2/test/TestBase.java
浏览文件 @
8dc58a75
h2/src/test/org/h2/test/synth/TestFuzzOptimizations.java
浏览文件 @
8dc58a75
...
@@ -53,7 +53,9 @@ public class TestFuzzOptimizations extends TestBase {
...
@@ -53,7 +53,9 @@ public class TestFuzzOptimizations extends TestBase {
create index idx_1 on test0(a);
create index idx_1 on test0(a);
create index idx_2 on test0(b, a);
create index idx_2 on test0(b, a);
create table test1(a int, b int, c int);
create table test1(a int, b int, c int);
insert into test0 select x / 100, mod(x / 10, 10), mod(x, 10) from system_range(0, 999);
insert into test0 select x / 100,
mod(x / 10, 10), mod(x, 10)
from system_range(0, 999);
update test0 set a = null where a = 9;
update test0 set a = null where a = 9;
update test0 set b = null where b = 9;
update test0 set b = null where b = 9;
update test0 set c = null where c = 9;
update test0 set c = null where c = 9;
...
@@ -80,16 +82,46 @@ public class TestFuzzOptimizations extends TestBase {
...
@@ -80,16 +82,46 @@ public class TestFuzzOptimizations extends TestBase {
db
.
execute
(
"insert into test1 select * from test0"
);
db
.
execute
(
"insert into test1 select * from test0"
);
Random
seedGenerator
=
new
Random
();
Random
seedGenerator
=
new
Random
();
String
[]
columns
=
new
String
[]
{
"a"
,
"b"
,
"c"
};
String
[]
columns
=
new
String
[]
{
"a"
,
"b"
,
"c"
};
String
[]
values
=
new
String
[]
{
null
,
"0"
,
"0"
,
"1"
,
"2"
,
"10"
,
"?"
};
String
[]
values
=
new
String
[]
{
null
,
"0"
,
"0"
,
"1"
,
"2"
,
"10"
,
"
a"
,
"
?"
};
String
[]
compares
=
new
String
[]
{
"in
"
,
"not in"
,
"="
,
"="
,
">"
,
"<"
,
">="
,
"<="
,
"<>
"
};
String
[]
compares
=
new
String
[]
{
"in
("
,
"not in("
,
"="
,
"="
,
">"
,
"<"
,
">="
,
"<="
,
"<>"
,
"in(select"
,
"not in(select
"
};
int
size
=
getSize
(
1000
,
10000
);
int
size
=
getSize
(
1000
,
10000
);
for
(
int
i
=
0
;
i
<
size
;
i
++)
{
for
(
int
i
=
0
;
i
<
size
;
i
++)
{
long
seed
=
seedGenerator
.
nextLong
();
long
seed
=
seedGenerator
.
nextLong
();
println
(
"seed: "
+
seed
);
println
(
"seed: "
+
seed
);
Random
random
=
new
Random
(
seed
);
Random
random
=
new
Random
(
seed
);
ArrayList
<
String
>
params
=
New
.
arrayList
();
String
condition
=
getRandomCondition
(
random
,
params
,
columns
,
compares
,
values
);
// System.out.println(condition + " " + params);
PreparedStatement
prep0
=
conn
.
prepareStatement
(
"select * from test0 where "
+
condition
+
" order by 1, 2, 3"
);
PreparedStatement
prep1
=
conn
.
prepareStatement
(
"select * from test1 where "
+
condition
+
" order by 1, 2, 3"
);
for
(
int
j
=
0
;
j
<
params
.
size
();
j
++)
{
prep0
.
setString
(
j
+
1
,
params
.
get
(
j
));
prep1
.
setString
(
j
+
1
,
params
.
get
(
j
));
}
ResultSet
rs0
=
prep0
.
executeQuery
();
ResultSet
rs1
=
prep1
.
executeQuery
();
assertEquals
(
"seed: "
+
seed
+
" "
+
condition
,
rs0
,
rs1
);
if
(
params
.
size
()
>
0
)
{
for
(
int
j
=
0
;
j
<
params
.
size
();
j
++)
{
String
value
=
values
[
random
.
nextInt
(
values
.
length
-
2
)];
params
.
set
(
j
,
value
);
prep0
.
setString
(
j
+
1
,
value
);
prep1
.
setString
(
j
+
1
,
value
);
}
assertEquals
(
"seed: "
+
seed
+
" "
+
condition
,
rs0
,
rs1
);
}
}
db
.
execute
(
"drop table test0, test1"
);
}
private
String
getRandomCondition
(
Random
random
,
ArrayList
<
String
>
params
,
String
[]
columns
,
String
[]
compares
,
String
[]
values
)
{
int
comp
=
1
+
random
.
nextInt
(
4
);
int
comp
=
1
+
random
.
nextInt
(
4
);
StringBuilder
buff
=
new
StringBuilder
();
StringBuilder
buff
=
new
StringBuilder
();
ArrayList
<
String
>
params
=
New
.
arrayList
();
for
(
int
j
=
0
;
j
<
comp
;
j
++)
{
for
(
int
j
=
0
;
j
<
comp
;
j
++)
{
if
(
j
>
0
)
{
if
(
j
>
0
)
{
buff
.
append
(
random
.
nextBoolean
()
?
" and "
:
" or "
);
buff
.
append
(
random
.
nextBoolean
()
?
" and "
:
" or "
);
...
@@ -97,8 +129,7 @@ public class TestFuzzOptimizations extends TestBase {
...
@@ -97,8 +129,7 @@ public class TestFuzzOptimizations extends TestBase {
String
column
=
columns
[
random
.
nextInt
(
columns
.
length
)];
String
column
=
columns
[
random
.
nextInt
(
columns
.
length
)];
String
compare
=
compares
[
random
.
nextInt
(
compares
.
length
)];
String
compare
=
compares
[
random
.
nextInt
(
compares
.
length
)];
buff
.
append
(
column
).
append
(
' '
).
append
(
compare
);
buff
.
append
(
column
).
append
(
' '
).
append
(
compare
);
if
(
compare
.
endsWith
(
"in"
))
{
if
(
compare
.
endsWith
(
"in("
))
{
buff
.
append
(
"("
);
int
len
=
1
+
random
.
nextInt
(
3
);
int
len
=
1
+
random
.
nextInt
(
3
);
for
(
int
k
=
0
;
k
<
len
;
k
++)
{
for
(
int
k
=
0
;
k
<
len
;
k
++)
{
if
(
k
>
0
)
{
if
(
k
>
0
)
{
...
@@ -107,46 +138,27 @@ public class TestFuzzOptimizations extends TestBase {
...
@@ -107,46 +138,27 @@ public class TestFuzzOptimizations extends TestBase {
String
value
=
values
[
random
.
nextInt
(
values
.
length
)];
String
value
=
values
[
random
.
nextInt
(
values
.
length
)];
buff
.
append
(
value
);
buff
.
append
(
value
);
if
(
"?"
.
equals
(
value
))
{
if
(
"?"
.
equals
(
value
))
{
value
=
values
[
random
.
nextInt
(
values
.
length
-
1
)];
value
=
values
[
random
.
nextInt
(
values
.
length
-
2
)];
params
.
add
(
value
);
params
.
add
(
value
);
}
}
}
}
buff
.
append
(
")"
);
buff
.
append
(
")"
);
}
else
if
(
compare
.
endsWith
(
"(select"
))
{
String
col
=
columns
[
random
.
nextInt
(
columns
.
length
)];
buff
.
append
(
" "
).
append
(
col
).
append
(
" from test1 where "
);
String
condition
=
getRandomCondition
(
random
,
params
,
columns
,
compares
,
values
);
buff
.
append
(
condition
);
buff
.
append
(
")"
);
}
else
{
}
else
{
String
value
=
values
[
random
.
nextInt
(
values
.
length
)];
String
value
=
values
[
random
.
nextInt
(
values
.
length
)];
buff
.
append
(
value
);
buff
.
append
(
value
);
if
(
"?"
.
equals
(
value
))
{
if
(
"?"
.
equals
(
value
))
{
value
=
values
[
random
.
nextInt
(
values
.
length
-
1
)];
value
=
values
[
random
.
nextInt
(
values
.
length
-
2
)];
params
.
add
(
value
);
params
.
add
(
value
);
}
}
}
}
}
}
String
condition
=
buff
.
toString
();
return
buff
.
toString
();
// System.out.println(condition + " " + params);
PreparedStatement
prep0
=
conn
.
prepareStatement
(
"select * from test0 where "
+
condition
+
" order by 1, 2, 3"
);
PreparedStatement
prep1
=
conn
.
prepareStatement
(
"select * from test1 where "
+
condition
+
" order by 1, 2, 3"
);
for
(
int
j
=
0
;
j
<
params
.
size
();
j
++)
{
prep0
.
setString
(
j
+
1
,
params
.
get
(
j
));
prep1
.
setString
(
j
+
1
,
params
.
get
(
j
));
}
ResultSet
rs0
=
prep0
.
executeQuery
();
ResultSet
rs1
=
prep1
.
executeQuery
();
assertEquals
(
"seed: "
+
seed
+
" "
+
condition
,
rs0
,
rs1
);
if
(
params
.
size
()
>
0
)
{
for
(
int
j
=
0
;
j
<
params
.
size
();
j
++)
{
String
value
=
values
[
random
.
nextInt
(
values
.
length
-
1
)];
params
.
set
(
j
,
value
);
prep0
.
setString
(
j
+
1
,
value
);
prep1
.
setString
(
j
+
1
,
value
);
}
assertEquals
(
"seed: "
+
seed
+
" "
+
condition
,
rs0
,
rs1
);
}
}
db
.
execute
(
"drop table test0, test1"
);
}
}
private
void
testInSelect
()
{
private
void
testInSelect
()
{
...
...
h2/src/tools/org/h2/build/doc/dictionary.txt
浏览文件 @
8dc58a75
...
@@ -644,4 +644,4 @@ pulakka pagination collide visual aejaks simulation joonas finland minneapolis
...
@@ -644,4 +644,4 @@ pulakka pagination collide visual aejaks simulation joonas finland minneapolis
determine timestampdiff harmony doap shortdesc wireless iceland sigurdsson
determine timestampdiff harmony doap shortdesc wireless iceland sigurdsson
darri chunks bjorn chunked watson regardless usefulinc represented pushd
darri chunks bjorn chunked watson regardless usefulinc represented pushd
recorder grajciar recording slovensky uninitialized arriving lubomir unchanged
recorder grajciar recording slovensky uninitialized arriving lubomir unchanged
erik dick calculations
erik dick calculations
lutin
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论