提交 16a8bd79 authored 作者: Thomas Mueller's avatar Thomas Mueller

--no commit message

--no commit message
上级 fa19276c
......@@ -295,18 +295,21 @@ java org.h2.test.TestAll timer
System.setProperty("h2.maxMemoryRowsDistinct", "128");
System.setProperty("h2.check2", "true");
/*
file lock serialized with counter
// System.setProperty("h2.pageSize", "64");
test with small freeList pages, page size 64
test if compact always works as expected
implement node row counts (disabled by default)
check auto-build
check memory usage when inserting a lot of rows
http://www.apache.org/dev/contrib-email-tips.html
google app engine
documentation: rolling review at history.html
documentation: rolling review at jaqu.html
System.setProperty("h2.optimizeInList", "true");
System.setProperty("h2.optimizeOr", "true");
......
......@@ -29,6 +29,7 @@ public class TestRunscript extends TestBase implements Trigger {
}
public void test() throws SQLException {
testClobPrimaryKey();
test(false);
test(true);
deleteDb("runscript");
......@@ -44,6 +45,25 @@ public class TestRunscript extends TestBase implements Trigger {
return Math.abs(a);
}
private void testClobPrimaryKey() throws SQLException {
deleteDb("runscript");
Connection conn;
Statement stat;
conn = getConnection("runscript");
stat = conn.createStatement();
stat.execute("create table test(id int not null, data clob) as select 1, space(4100)");
// the primary key for SYSTEM_LOB_STREAM used to be named like this
stat.execute("create primary key primary_key_e on test(id)");
stat.execute("script to '" + baseDir + "/backup.sql'");
conn.close();
deleteDb("runscript");
conn = getConnection("runscript");
stat = conn.createStatement();
stat.execute("runscript from '" + baseDir + "/backup.sql'");
conn.close();
deleteDb("runscriptRestore");
}
private void test(boolean password) throws SQLException {
deleteDb("runscript");
Connection conn1, conn2;
......
......@@ -1703,14 +1703,15 @@ insert into test values(1, 'abc' || space(20));
script nopasswords nosettings blocksize 10;
> SCRIPT
> -------------------------------------------------------------------------------------------------------------------
> --------------------------------------------------------------------------------------------------------------
> -- 1 +/- SELECT COUNT(*) FROM PUBLIC.TEST;
> ALTER TABLE PUBLIC.TEST ADD CONSTRAINT PUBLIC.CONSTRAINT_2 PRIMARY KEY(ID);
> CALL SYSTEM_COMBINE_BLOB(-1);
> CREATE ALIAS IF NOT EXISTS SYSTEM_COMBINE_BLOB FOR "org.h2.command.dml.ScriptCommand.combineBlob";
> CREATE ALIAS IF NOT EXISTS SYSTEM_COMBINE_CLOB FOR "org.h2.command.dml.ScriptCommand.combineClob";
> CREATE MEMORY TABLE PUBLIC.TEST( ID INT NOT NULL, DATA CLOB );
> CREATE TABLE IF NOT EXISTS SYSTEM_LOB_STREAM(ID INT, PART INT, CDATA VARCHAR, BDATA BINARY, PRIMARY KEY(ID, PART));
> CREATE PRIMARY KEY SYSTEM_LOB_STREAM_PRIMARY_KEY ON SYSTEM_LOB_STREAM(ID, PART);
> CREATE TABLE IF NOT EXISTS SYSTEM_LOB_STREAM(ID INT NOT NULL, PART INT NOT NULL, CDATA VARCHAR, BDATA BINARY);
> CREATE USER IF NOT EXISTS SA PASSWORD '' ADMIN;
> DROP ALIAS IF EXISTS SYSTEM_COMBINE_BLOB;
> DROP ALIAS IF EXISTS SYSTEM_COMBINE_CLOB;
......@@ -1719,7 +1720,7 @@ script nopasswords nosettings blocksize 10;
> INSERT INTO SYSTEM_LOB_STREAM VALUES(0, 0, 'abc ', NULL);
> INSERT INTO SYSTEM_LOB_STREAM VALUES(0, 1, ' ', NULL);
> INSERT INTO SYSTEM_LOB_STREAM VALUES(0, 2, ' ', NULL);
> rows: 15
> rows: 16
drop table test;
> ok
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论