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
<h2
id=
"supporters"
>
Supporters
</h2>
<p>
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
via PayPal:
spread the word, and translated this project. Also many thanks to the donors:
</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://pokercopilot.com"
>
Poker Copilot, Steve McLeod, Germany
</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
System
.
setProperty
(
"h2.maxMemoryRowsDistinct"
,
"128"
);
System
.
setProperty
(
"h2.check2"
,
"true"
);
// System.setProperty("h2.lobInDatabase", "true");
// System.setProperty("h2.analyzeAuto", "100");
// 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
-Xmx1500m -D reopenOffset=3 -D reopenShift=1
test with small freeList pages, page size 64
power failure test
power failure test: MULTI_THREADED=TRUE
power failure test: larger binaries and additional index.
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;
create table test(id identity, name varchar(100) default space(100));
@LOOP 10 insert into test select null, null from system_range(1, 100000);
...
...
h2/src/test/org/h2/test/TestBase.java
浏览文件 @
8dc58a75
...
...
@@ -657,7 +657,7 @@ public abstract class TestBase {
assertTrue
(
message
,
rs1
.
next
());
for
(
int
i
=
0
;
i
<
columns
;
i
++)
{
assertEquals
(
message
,
rs0
.
getString
(
i
+
1
),
rs1
.
getString
(
i
+
1
));
}
}
}
assertFalse
(
message
,
rs0
.
next
());
assertFalse
(
message
,
rs1
.
next
());
...
...
h2/src/test/org/h2/test/synth/TestFuzzOptimizations.java
浏览文件 @
8dc58a75
...
...
@@ -53,7 +53,9 @@ public class TestFuzzOptimizations extends TestBase {
create index idx_1 on test0(a);
create index idx_2 on test0(b, a);
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 b = null where b = 9;
update test0 set c = null where c = 9;
...
...
@@ -80,49 +82,16 @@ public class TestFuzzOptimizations extends TestBase {
db
.
execute
(
"insert into test1 select * from test0"
);
Random
seedGenerator
=
new
Random
();
String
[]
columns
=
new
String
[]
{
"a"
,
"b"
,
"c"
};
String
[]
values
=
new
String
[]
{
null
,
"0"
,
"0"
,
"1"
,
"2"
,
"10"
,
"?"
};
String
[]
compares
=
new
String
[]
{
"in
"
,
"not in"
,
"="
,
"="
,
">"
,
"<"
,
">="
,
"<="
,
"<>
"
};
String
[]
values
=
new
String
[]
{
null
,
"0"
,
"0"
,
"1"
,
"2"
,
"10"
,
"
a"
,
"
?"
};
String
[]
compares
=
new
String
[]
{
"in
("
,
"not in("
,
"="
,
"="
,
">"
,
"<"
,
">="
,
"<="
,
"<>"
,
"in(select"
,
"not in(select
"
};
int
size
=
getSize
(
1000
,
10000
);
for
(
int
i
=
0
;
i
<
size
;
i
++)
{
long
seed
=
seedGenerator
.
nextLong
();
println
(
"seed: "
+
seed
);
Random
random
=
new
Random
(
seed
);
int
comp
=
1
+
random
.
nextInt
(
4
);
StringBuilder
buff
=
new
StringBuilder
();
ArrayList
<
String
>
params
=
New
.
arrayList
();
for
(
int
j
=
0
;
j
<
comp
;
j
++)
{
if
(
j
>
0
)
{
buff
.
append
(
random
.
nextBoolean
()
?
" and "
:
" or "
);
}
String
column
=
columns
[
random
.
nextInt
(
columns
.
length
)];
String
compare
=
compares
[
random
.
nextInt
(
compares
.
length
)];
buff
.
append
(
column
).
append
(
' '
).
append
(
compare
);
if
(
compare
.
endsWith
(
"in"
))
{
buff
.
append
(
"("
);
int
len
=
1
+
random
.
nextInt
(
3
);
for
(
int
k
=
0
;
k
<
len
;
k
++)
{
if
(
k
>
0
)
{
buff
.
append
(
", "
);
}
String
value
=
values
[
random
.
nextInt
(
values
.
length
)];
buff
.
append
(
value
);
if
(
"?"
.
equals
(
value
))
{
value
=
values
[
random
.
nextInt
(
values
.
length
-
1
)];
params
.
add
(
value
);
}
}
buff
.
append
(
")"
);
}
else
{
String
value
=
values
[
random
.
nextInt
(
values
.
length
)];
buff
.
append
(
value
);
if
(
"?"
.
equals
(
value
))
{
value
=
values
[
random
.
nextInt
(
values
.
length
-
1
)];
params
.
add
(
value
);
}
}
}
String
condition
=
buff
.
toString
();
// System.out.println(condition + " " + params);
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"
);
...
...
@@ -138,7 +107,7 @@ public class TestFuzzOptimizations extends TestBase {
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
)];
String
value
=
values
[
random
.
nextInt
(
values
.
length
-
2
)];
params
.
set
(
j
,
value
);
prep0
.
setString
(
j
+
1
,
value
);
prep1
.
setString
(
j
+
1
,
value
);
...
...
@@ -149,6 +118,49 @@ public class TestFuzzOptimizations extends TestBase {
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
);
StringBuilder
buff
=
new
StringBuilder
();
for
(
int
j
=
0
;
j
<
comp
;
j
++)
{
if
(
j
>
0
)
{
buff
.
append
(
random
.
nextBoolean
()
?
" and "
:
" or "
);
}
String
column
=
columns
[
random
.
nextInt
(
columns
.
length
)];
String
compare
=
compares
[
random
.
nextInt
(
compares
.
length
)];
buff
.
append
(
column
).
append
(
' '
).
append
(
compare
);
if
(
compare
.
endsWith
(
"in("
))
{
int
len
=
1
+
random
.
nextInt
(
3
);
for
(
int
k
=
0
;
k
<
len
;
k
++)
{
if
(
k
>
0
)
{
buff
.
append
(
", "
);
}
String
value
=
values
[
random
.
nextInt
(
values
.
length
)];
buff
.
append
(
value
);
if
(
"?"
.
equals
(
value
))
{
value
=
values
[
random
.
nextInt
(
values
.
length
-
2
)];
params
.
add
(
value
);
}
}
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
{
String
value
=
values
[
random
.
nextInt
(
values
.
length
)];
buff
.
append
(
value
);
if
(
"?"
.
equals
(
value
))
{
value
=
values
[
random
.
nextInt
(
values
.
length
-
2
)];
params
.
add
(
value
);
}
}
}
return
buff
.
toString
();
}
private
void
testInSelect
()
{
Db
db
=
new
Db
(
conn
);
db
.
execute
(
"CREATE TABLE TEST(A INT, B INT)"
);
...
...
h2/src/tools/org/h2/build/doc/dictionary.txt
浏览文件 @
8dc58a75
...
...
@@ -644,4 +644,4 @@ pulakka pagination collide visual aejaks simulation joonas finland minneapolis
determine timestampdiff harmony doap shortdesc wireless iceland sigurdsson
darri chunks bjorn chunked watson regardless usefulinc represented pushd
recorder grajciar recording slovensky uninitialized arriving lubomir unchanged
erik dick calculations
erik dick calculations
lutin
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论