提交 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 ...@@ -295,18 +295,21 @@ java org.h2.test.TestAll timer
System.setProperty("h2.maxMemoryRowsDistinct", "128"); System.setProperty("h2.maxMemoryRowsDistinct", "128");
System.setProperty("h2.check2", "true"); System.setProperty("h2.check2", "true");
/* /*
file lock serialized with counter
// System.setProperty("h2.pageSize", "64");
test with small freeList pages, page size 64 test with small freeList pages, page size 64
test if compact always works as expected 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 check memory usage when inserting a lot of rows
http://www.apache.org/dev/contrib-email-tips.html http://www.apache.org/dev/contrib-email-tips.html
google app engine google app engine
documentation: rolling review at history.html
documentation: rolling review at jaqu.html
System.setProperty("h2.optimizeInList", "true"); System.setProperty("h2.optimizeInList", "true");
System.setProperty("h2.optimizeOr", "true"); System.setProperty("h2.optimizeOr", "true");
......
...@@ -29,6 +29,7 @@ public class TestRunscript extends TestBase implements Trigger { ...@@ -29,6 +29,7 @@ public class TestRunscript extends TestBase implements Trigger {
} }
public void test() throws SQLException { public void test() throws SQLException {
testClobPrimaryKey();
test(false); test(false);
test(true); test(true);
deleteDb("runscript"); deleteDb("runscript");
...@@ -44,6 +45,25 @@ public class TestRunscript extends TestBase implements Trigger { ...@@ -44,6 +45,25 @@ public class TestRunscript extends TestBase implements Trigger {
return Math.abs(a); 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 { private void test(boolean password) throws SQLException {
deleteDb("runscript"); deleteDb("runscript");
Connection conn1, conn2; Connection conn1, conn2;
......
...@@ -1703,14 +1703,15 @@ insert into test values(1, 'abc' || space(20)); ...@@ -1703,14 +1703,15 @@ insert into test values(1, 'abc' || space(20));
script nopasswords nosettings blocksize 10; script nopasswords nosettings blocksize 10;
> SCRIPT > SCRIPT
> ------------------------------------------------------------------------------------------------------------------- > --------------------------------------------------------------------------------------------------------------
> -- 1 +/- SELECT COUNT(*) FROM PUBLIC.TEST; > -- 1 +/- SELECT COUNT(*) FROM PUBLIC.TEST;
> ALTER TABLE PUBLIC.TEST ADD CONSTRAINT PUBLIC.CONSTRAINT_2 PRIMARY KEY(ID); > ALTER TABLE PUBLIC.TEST ADD CONSTRAINT PUBLIC.CONSTRAINT_2 PRIMARY KEY(ID);
> CALL SYSTEM_COMBINE_BLOB(-1); > 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_BLOB FOR "org.h2.command.dml.ScriptCommand.combineBlob";
> CREATE ALIAS IF NOT EXISTS SYSTEM_COMBINE_CLOB FOR "org.h2.command.dml.ScriptCommand.combineClob"; > 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 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; > CREATE USER IF NOT EXISTS SA PASSWORD '' ADMIN;
> DROP ALIAS IF EXISTS SYSTEM_COMBINE_BLOB; > DROP ALIAS IF EXISTS SYSTEM_COMBINE_BLOB;
> DROP ALIAS IF EXISTS SYSTEM_COMBINE_CLOB; > DROP ALIAS IF EXISTS SYSTEM_COMBINE_CLOB;
...@@ -1719,7 +1720,7 @@ script nopasswords nosettings blocksize 10; ...@@ -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, 0, 'abc ', NULL);
> INSERT INTO SYSTEM_LOB_STREAM VALUES(0, 1, ' ', NULL); > INSERT INTO SYSTEM_LOB_STREAM VALUES(0, 1, ' ', NULL);
> INSERT INTO SYSTEM_LOB_STREAM VALUES(0, 2, ' ', NULL); > INSERT INTO SYSTEM_LOB_STREAM VALUES(0, 2, ' ', NULL);
> rows: 15 > rows: 16
drop table test; drop table test;
> ok > ok
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论