提交 14cd5ad9 authored 作者: Thomas Mueller Graf's avatar Thomas Mueller Graf

Fix test cases, documentation

上级 72d728e3
......@@ -7,7 +7,7 @@ SELECT [ TOP term ] [ DISTINCT | ALL ] selectExpression [,...]
FROM tableExpression [,...] [ WHERE expression ]
[ GROUP BY expression [,...] ] [ HAVING expression ]
[ { UNION [ ALL ] | MINUS | EXCEPT | INTERSECT } select ] [ ORDER BY order [,...] ]
[ [ LIMIT expression ] [ OFFSET expression ] [ SAMPLE_SIZE rowCountInt ] ]
[ [ LIMIT expression ] [ OFFSET expression ] [ SAMPLE_SIZE rowCountInt ] ]
[ FOR UPDATE ]
","
Selects data from a table or multiple tables."
......
......@@ -96,7 +96,7 @@ EXPLAIN SELECT MIN(VALUE), MAX(VALUE) FROM TEST;
--> MIN(VALUE),
--> MAX(VALUE)
--> FROM PUBLIC.TEST
--> /* PUBLIC.TEST.tableScan */
--> /* PUBLIC.IDX_TEST_VALUE */
--> /* direct lookup */
;
......
......@@ -113,7 +113,7 @@ public class TestLob extends TestBase {
}
private void testRemoveAfterDeleteAndClose() throws Exception {
if (config.memory) {
if (config.memory || config.cipher != null) {
return;
}
deleteDb("lob");
......
......@@ -12,6 +12,7 @@ import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Map;
import java.util.Random;
import org.h2.api.ErrorCode;
import org.h2.mvstore.MVStore;
......@@ -45,19 +46,20 @@ public class TestOutOfMemory extends TestBase {
private void testMVStoreUsingInMemoryFileSystem() {
FilePath.register(new FilePathMem());
String fileName = "memLZF:" + getTestName();
String fileName = "memFS:" + getTestName();
MVStore store = MVStore.open(fileName);
Map<Integer, byte[]> map = store.openMap("test");
byte[] data = new byte[10 * 1024 * 1024];
Random r = new Random(1);
try {
for (int i = 0; i < 100; i++) {
byte[] data = new byte[10 * 1024 * 1024];
r.nextBytes(data);
map.put(i, data);
}
fail();
} catch (OutOfMemoryError e) {
// expected
}
data = null;
try {
store.close();
fail();
......@@ -72,7 +74,7 @@ public class TestOutOfMemory extends TestBase {
}
private void testDatabaseUsingInMemoryFileSystem() throws SQLException {
String url = "jdbc:h2:memLZF:" + getTestName();
String url = "jdbc:h2:memFS:" + getTestName();
Connection conn = DriverManager.getConnection(url);
Statement stat = conn.createStatement();
try {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论