提交 0a9d56c0 authored 作者: Thomas Mueller's avatar Thomas Mueller

Page store bugfixes

上级 530549d2
...@@ -18,7 +18,11 @@ Change Log ...@@ -18,7 +18,11 @@ Change Log
<h1>Change Log</h1> <h1>Change Log</h1>
<h2>Next Version (unreleased)</h2> <h2>Next Version (unreleased)</h2>
<ul><li>Issue 119: JaQu creates wrong WHERE condition on some inputs. <ul><li>The new page store mechanism is now alpha-level quality. The next release
will most likely be "1.2.120 beta" where this mode is enabled by default. To use
it right now, append ;PAGE_STORE=TRUE to the database URL. The file format
of this mode will probably not change any more.
</li><li>Issue 119: JaQu creates wrong WHERE conditions on some inputs.
</li><li>SELECT COUNT(*) FROM SYSTEM_RANGE(...) returned the wrong result. Fixed. </li><li>SELECT COUNT(*) FROM SYSTEM_RANGE(...) returned the wrong result. Fixed.
</li><li>The Recover tool now also processes the log files, however applying those changes </li><li>The Recover tool now also processes the log files, however applying those changes
is still a manual process. is still a manual process.
......
...@@ -83,6 +83,7 @@ See also <a href="build.html#providing_patches">Providing Patches</a>. ...@@ -83,6 +83,7 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>Index usage for (ID, NAME)=(1, 'Hi'); document </li><li>Index usage for (ID, NAME)=(1, 'Hi'); document
</li><li>Make DDL (Data Definition) operations transactional </li><li>Make DDL (Data Definition) operations transactional
</li><li>RANK() and DENSE_RANK(), Partition using OVER() </li><li>RANK() and DENSE_RANK(), Partition using OVER()
</li><li>Set a connection read only (Connection.setReadOnly) or using a connection parameter
</li><li>Suggestion: include Jetty as Servlet Container (like LAMP) </li><li>Suggestion: include Jetty as Servlet Container (like LAMP)
</li><li>Trace shipping to server </li><li>Trace shipping to server
</li><li>Version check: docs / web console (using Javascript), and maybe in the library (using TCP/IP) </li><li>Version check: docs / web console (using Javascript), and maybe in the library (using TCP/IP)
...@@ -249,7 +250,6 @@ See also <a href="build.html#providing_patches">Providing Patches</a>. ...@@ -249,7 +250,6 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>Support N'text' </li><li>Support N'text'
</li><li>Pure SQL triggers (example: update parent table if the child table is changed). </li><li>Pure SQL triggers (example: update parent table if the child table is changed).
</li><li>Support SCOPE_IDENTITY() to avoid problems when inserting rows in a trigger </li><li>Support SCOPE_IDENTITY() to avoid problems when inserting rows in a trigger
</li><li>Set a connection read only (Connection.setReadOnly)
</li><li>In MySQL mode, for AUTO_INCREMENT columns, don't set the primary key </li><li>In MySQL mode, for AUTO_INCREMENT columns, don't set the primary key
</li><li>Use JDK 1.4 file locking to create the lock file (but not yet by default); writing a system property to detect concurrent access from the same VM (different classloaders). </li><li>Use JDK 1.4 file locking to create the lock file (but not yet by default); writing a system property to detect concurrent access from the same VM (different classloaders).
</li><li>Support compatibility for jdbc:hsqldb:res: </li><li>Support compatibility for jdbc:hsqldb:res:
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -149,8 +149,8 @@ public class PageStore implements CacheWriter { ...@@ -149,8 +149,8 @@ public class PageStore implements CacheWriter {
private static final int META_TYPE_BTREE_INDEX = 1; private static final int META_TYPE_BTREE_INDEX = 1;
private static final int META_TABLE_ID = -1; private static final int META_TABLE_ID = -1;
private static final int MAX_COMACT_TIME = 2000; private static final int MAX_COMPACT_TIME = 2000;
private static final int MAX_COMACT_COUNT = Integer.MAX_VALUE; private static final int MAX_COMPACT_COUNT = Integer.MAX_VALUE;
private static final SearchRow[] EMPTY_SEARCH_ROW = new SearchRow[0]; private static final SearchRow[] EMPTY_SEARCH_ROW = new SearchRow[0];
...@@ -373,8 +373,8 @@ public class PageStore implements CacheWriter { ...@@ -373,8 +373,8 @@ public class PageStore implements CacheWriter {
recoveryRunning = false; recoveryRunning = false;
} }
long start = System.currentTimeMillis(); long start = System.currentTimeMillis();
int maxCompactTime = MAX_COMACT_TIME; int maxCompactTime = MAX_COMPACT_TIME;
int maxMove = MAX_COMACT_COUNT; int maxMove = MAX_COMPACT_COUNT;
for (int x = lastUsed, j = 0; x > MIN_PAGE_COUNT && j < maxMove; x--, j++) { for (int x = lastUsed, j = 0; x > MIN_PAGE_COUNT && j < maxMove; x--, j++) {
compact(x); compact(x);
long now = System.currentTimeMillis(); long now = System.currentTimeMillis();
...@@ -1461,6 +1461,7 @@ public class PageStore implements CacheWriter { ...@@ -1461,6 +1461,7 @@ public class PageStore implements CacheWriter {
* Check if the stored checksum is correct * Check if the stored checksum is correct
* @param d the data * @param d the data
* @param pageId the page id * @param pageId the page id
* @param pageSize the page size
* @return true if it is correct * @return true if it is correct
*/ */
public static boolean checksumTest(byte[] d, int pageId, int pageSize) { public static boolean checksumTest(byte[] d, int pageId, int pageSize) {
......
...@@ -299,6 +299,8 @@ java org.h2.test.TestAll timer ...@@ -299,6 +299,8 @@ java org.h2.test.TestAll timer
/* /*
test cacheTQ
javadoc: constructor parameters are not verified (PageOutputStream) javadoc: constructor parameters are not verified (PageOutputStream)
System.setProperty("h2.optimizeInList", "true"); System.setProperty("h2.optimizeInList", "true");
......
...@@ -91,8 +91,11 @@ public class TestBtreeIndex extends TestBase { ...@@ -91,8 +91,11 @@ public class TestBtreeIndex extends TestBase {
StringBuilder buff = new StringBuilder(); StringBuilder buff = new StringBuilder();
for (int j = 0; j < prefixLength; j++) { for (int j = 0; j < prefixLength; j++) {
buff.append("x"); buff.append("x");
if (buff.length() % 10 == 0) {
buff.append(buff.length());
}
} }
String prefix = buff.toString(); String prefix = buff.toString().substring(0, prefixLength);
DeleteDbFiles.execute(baseDir, null, true); DeleteDbFiles.execute(baseDir, null, true);
Connection conn = getConnection("index"); Connection conn = getConnection("index");
try { try {
...@@ -148,6 +151,17 @@ public class TestBtreeIndex extends TestBase { ...@@ -148,6 +151,17 @@ public class TestBtreeIndex extends TestBase {
testCount = 0; testCount = 0;
ResultSet rs = stat.executeQuery("SELECT text FROM a ORDER BY text"); ResultSet rs = stat.executeQuery("SELECT text FROM a ORDER BY text");
ResultSet rs2 = conn.createStatement().executeQuery("SELECT text FROM a ORDER BY 'x' || text"); ResultSet rs2 = conn.createStatement().executeQuery("SELECT text FROM a ORDER BY 'x' || text");
//System.out.println("-----------");
//while(rs.next()) {
// System.out.println(rs.getString(1));
//}
//System.out.println("-----------");
//while(rs2.next()) {
// System.out.println(rs2.getString(1));
//}
//if (true) throw new Error("stop");
//
testCount = 0; testCount = 0;
while (rs.next() && rs2.next()) { while (rs.next() && rs2.next()) {
if (!rs.getString(1).equals(rs2.getString(1))) { if (!rs.getString(1).equals(rs2.getString(1))) {
......
...@@ -611,4 +611,4 @@ daload dstore saload anewarray tableswitch lushr ladd lshr lreturn acmpne ...@@ -611,4 +611,4 @@ daload dstore saload anewarray tableswitch lushr ladd lshr lreturn acmpne
locals multianewarray icmpne fneg faload ifeq decompiler zeroes forgot locals multianewarray icmpne fneg faload ifeq decompiler zeroes forgot
modern slight boost characteristics significantly gae vfs centrally ten modern slight boost characteristics significantly gae vfs centrally ten
approach risky getters suxxess gmb delegate delegating delegates collisions approach risky getters suxxess gmb delegate delegating delegates collisions
linkage superfluous linkage superfluous disallow scoop moebius inputs
\ No newline at end of file \ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论