提交 38f76b45 authored 作者: Thomas Mueller's avatar Thomas Mueller

--no commit message

--no commit message
上级 b02ed257
...@@ -621,28 +621,28 @@ public class DiskFile implements CacheWriter { ...@@ -621,28 +621,28 @@ public class DiskFile implements CacheWriter {
setPageOwner(page, FREE_PAGE); setPageOwner(page, FREE_PAGE);
} else { } else {
int todoTestThis; int todoTestThis;
synchronized (potentiallyFreePages) { // synchronized (potentiallyFreePages) {
potentiallyFreePages.add(ObjectUtils.getInteger(page)); // potentiallyFreePages.add(ObjectUtils.getInteger(page));
if (potentiallyFreePages.size() > 20) { // if (potentiallyFreePages.size() > 20) {
Session[] sessions = database.getSessions(); // Session[] sessions = database.getSessions();
int oldest = 0; // int oldest = 0;
for (int i = 0; i < sessions.length; i++) { // for (int i = 0; i < sessions.length; i++) {
int deleteId = sessions[i].getLastUncommittedDelete(); // int deleteId = sessions[i].getLastUncommittedDelete();
if (oldest == 0 || deleteId < oldest) { // if (oldest == 0 || deleteId < oldest) {
oldest = deleteId; // oldest = deleteId;
} // }
} // }
for (Iterator it = potentiallyFreePages.iterator(); it.hasNext();) { // for (Iterator it = potentiallyFreePages.iterator(); it.hasNext();) {
int p = ((Integer) it.next()).intValue(); // int p = ((Integer) it.next()).intValue();
if (oldest == 0 || oldest > pageDelete.get(p)) { // if (oldest == 0 || oldest > pageDelete.get(p)) {
setPageOwner(p, FREE_PAGE); // setPageOwner(p, FREE_PAGE);
//int testing; ////int testing;
//System.out.println("free page " + p); ////System.out.println("free page " + p);
it.remove(); // it.remove();
} // }
} // }
} // }
} // }
} }
} }
......
...@@ -150,6 +150,8 @@ java org.h2.test.TestAll timer ...@@ -150,6 +150,8 @@ java org.h2.test.TestAll timer
TestAll test = new TestAll(); TestAll test = new TestAll();
test.printSystem(); test.printSystem();
new TestCrashAPI().init(test).testCase(2005340068);
/* /*
Test space re-use Test space re-use
...@@ -410,8 +412,8 @@ DROP TABLE MY_TEST; ...@@ -410,8 +412,8 @@ DROP TABLE MY_TEST;
int todo; int todo;
// new TestLogFile().runTest(this); // new TestLogFile().runTest(this);
new TestMemoryUsage().runTest(this); new TestMemoryUsage().runTest(this);
new TestMultiConn().runTest(this); new TestMultiConn().runTest(this);
new TestMultiDimension().runTest(this); new TestMultiDimension().runTest(this);
new TestMultiThread().runTest(this); new TestMultiThread().runTest(this);
...@@ -424,7 +426,10 @@ DROP TABLE MY_TEST; ...@@ -424,7 +426,10 @@ DROP TABLE MY_TEST;
new TestSQLInjection().runTest(this); new TestSQLInjection().runTest(this);
new TestSessionsLocks().runTest(this); new TestSessionsLocks().runTest(this);
new TestSequence().runTest(this); new TestSequence().runTest(this);
new TestSpaceReuse().runTest(this);
int todo2;
// new TestSpaceReuse().runTest(this);
new TestSpeed().runTest(this); new TestSpeed().runTest(this);
new TestTempTables().runTest(this); new TestTempTables().runTest(this);
new TestTransaction().runTest(this); new TestTransaction().runTest(this);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论