提交 44f5b6c2 authored 作者: Thomas Mueller's avatar Thomas Mueller

Improved error reporting / better tests

上级 13be8da1
...@@ -18,7 +18,8 @@ Change Log ...@@ -18,7 +18,8 @@ Change Log
<h1>Change Log</h1> <h1>Change Log</h1>
<h2>Next Version (unreleased)</h2> <h2>Next Version (unreleased)</h2>
<ul><li>When using the PageStore, opening a database failed in some cases with a NullPointerException <ul><li>Large result sets now always create temporary tables instead of temporary files.
</li><li>When using the PageStore, opening a database failed in some cases with a NullPointerException
if temporary tables were used (explicitly, or implicitly when using large result sets). if temporary tables were used (explicitly, or implicitly when using large result sets).
</li><li>If a database file in the PageStore file format exists, this file and this mode </li><li>If a database file in the PageStore file format exists, this file and this mode
is now used, even if the database URL does not contain "MV_STORE=FALSE". is now used, even if the database URL does not contain "MV_STORE=FALSE".
......
...@@ -675,7 +675,9 @@ public class Database implements DataHandler { ...@@ -675,7 +675,9 @@ public class Database implements DataHandler {
} }
traceSystem = new TraceSystem(null); traceSystem = new TraceSystem(null);
trace = traceSystem.getTrace(Trace.DATABASE); trace = traceSystem.getTrace(Trace.DATABASE);
getPageStore(); if (dbSettings.mvStore) {
getPageStore();
}
} }
systemUser = new User(this, 0, SYSTEM_USER_NAME, true); systemUser = new User(this, 0, SYSTEM_USER_NAME, true);
mainSchema = new Schema(this, 0, Constants.SCHEMA_MAIN, systemUser, true); mainSchema = new Schema(this, 0, Constants.SCHEMA_MAIN, systemUser, true);
......
...@@ -104,6 +104,7 @@ MVStore: ...@@ -104,6 +104,7 @@ MVStore:
- Support SortedMap for MVMap - Support SortedMap for MVMap
- compact: copy whole pages (without having to open all maps) - compact: copy whole pages (without having to open all maps)
- maybe change the length code to have lower gaps - maybe change the length code to have lower gaps
- test with very low limits (such as: short chunks, small pages)
*/ */
......
...@@ -225,6 +225,9 @@ public class LobStorageMap implements LobStorageInterface { ...@@ -225,6 +225,9 @@ public class LobStorageMap implements LobStorageInterface {
throws IOException { throws IOException {
init(); init();
Object[] value = lobMap.get(lob.getLobId()); Object[] value = lobMap.get(lob.getLobId());
if (value == null) {
throw DbException.throwInternalError("Lob not found: " + lob.getLobId());
}
byte[] streamStoreId = (byte[]) value[0]; byte[] streamStoreId = (byte[]) value[0];
return streamStore.get(streamStoreId); return streamStore.get(streamStoreId);
} }
......
...@@ -389,7 +389,7 @@ java org.h2.test.TestAll timer ...@@ -389,7 +389,7 @@ java org.h2.test.TestAll timer
; // TEST ; // TEST
// System.setProperty("h2.maxMemoryRows", "2"); // System.setProperty("h2.maxMemoryRows", "2");
System.setProperty("h2.maxMemoryRows", "100"); System.setProperty("h2.maxMemoryRows", "10");
// System.setProperty("h2.maxMemoryRows", "1000"); // System.setProperty("h2.maxMemoryRows", "1000");
// System.setProperty("h2.maxMemoryRows", "2"); // System.setProperty("h2.maxMemoryRows", "2");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论