Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
16a8bd79
提交
16a8bd79
authored
11月 27, 2009
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
--no commit message
上级
fa19276c
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
31 行增加
和
7 行删除
+31
-7
TestAll.java
h2/src/test/org/h2/test/TestAll.java
+7
-4
TestRunscript.java
h2/src/test/org/h2/test/db/TestRunscript.java
+20
-0
test-1.2.txt
h2/src/test/org/h2/test/test-1.2.txt
+4
-3
没有找到文件。
h2/src/test/org/h2/test/TestAll.java
浏览文件 @
16a8bd79
...
...
@@ -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");
...
...
h2/src/test/org/h2/test/db/TestRunscript.java
浏览文件 @
16a8bd79
...
...
@@ -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
;
...
...
h2/src/test/org/h2/test/test-1.2.txt
浏览文件 @
16a8bd79
...
...
@@ -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: 1
5
> rows: 1
6
drop table test;
> ok
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论