提交 8dc58a75 authored 作者: Thomas Mueller's avatar Thomas Mueller

Documentation.

上级 f22ff7e4
...@@ -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>
......
...@@ -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);
......
...@@ -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() {
......
...@@ -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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论