Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
09f43661
提交
09f43661
authored
4月 22, 2007
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
--no commit message
上级
9f7d4136
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
73 行增加
和
11 行删除
+73
-11
ant-build.properties
h2/ant-build.properties
+3
-3
TestPreparedStatement.java
h2/src/test/org/h2/test/jdbc/TestPreparedStatement.java
+12
-0
TestResultSet.java
h2/src/test/org/h2/test/jdbc/TestResultSet.java
+40
-1
TestHalt.java
h2/src/test/org/h2/test/synth/TestHalt.java
+2
-2
TestTools.java
h2/src/test/org/h2/test/unit/TestTools.java
+3
-3
dictionary.txt
h2/src/tools/org/h2/tools/doc/dictionary.txt
+13
-2
没有找到文件。
h2/ant-build.properties
浏览文件 @
09f43661
#Sun Mar 04 13:24:22 CET 2007
javac
=
javac
#Sun Apr 22 05:14:53 CEST 2007
benchmark.drivers.dir
=
D
\:
/data/java
version.name.maven
=
1.0.20070304
javac
=
javac
version.name.maven
=
1.0.20070320
jdk
=
1.4
h2/src/test/org/h2/test/jdbc/TestPreparedStatement.java
浏览文件 @
09f43661
...
...
@@ -27,6 +27,7 @@ public class TestPreparedStatement extends TestBase {
deleteDb
(
"preparedStatement"
);
Connection
conn
=
getConnection
(
"preparedStatement"
);
testArray
(
conn
);
testUUIDGeneratedKeys
(
conn
);
testSetObject
(
conn
);
testPreparedSubquery
(
conn
);
...
...
@@ -44,6 +45,17 @@ public class TestPreparedStatement extends TestBase {
conn
.
close
();
}
private
void
testArray
(
Connection
conn
)
throws
Exception
{
PreparedStatement
prep
=
conn
.
prepareStatement
(
"select * from table(x int = ?) order by x"
);
prep
.
setObject
(
1
,
new
Object
[]{
new
BigDecimal
(
"1"
),
"2"
});
ResultSet
rs
=
prep
.
executeQuery
();
rs
.
next
();
check
(
rs
.
getString
(
1
),
"1"
);
rs
.
next
();
check
(
rs
.
getString
(
1
),
"2"
);
checkFalse
(
rs
.
next
());
}
private
void
testUUIDGeneratedKeys
(
Connection
conn
)
throws
Exception
{
Statement
stat
=
conn
.
createStatement
();
stat
.
execute
(
"CREATE TABLE TEST_UUID(id UUID DEFAULT random_UUID() PRIMARY KEY)"
);
...
...
h2/src/test/org/h2/test/jdbc/TestResultSet.java
浏览文件 @
09f43661
...
...
@@ -9,6 +9,7 @@ import java.io.IOException;
import
java.io.InputStream
;
import
java.io.InputStreamReader
;
import
java.math.BigDecimal
;
import
java.sql.Array
;
import
java.sql.Connection
;
import
java.sql.Date
;
import
java.sql.PreparedStatement
;
...
...
@@ -34,6 +35,7 @@ public class TestResultSet extends TestBase {
stat
=
conn
.
createStatement
();
testArray
();
testLimitMaxRows
();
trace
(
"max rows="
+
stat
.
getMaxRows
());
...
...
@@ -49,7 +51,6 @@ public class TestResultSet extends TestBase {
testDatetimeWithCalendar
();
testBlob
();
testClob
();
testAutoIncrement
();
conn
.
close
();
...
...
@@ -775,6 +776,44 @@ public class TestResultSet extends TestBase {
stat
.
execute
(
"DROP TABLE TEST"
);
}
void
testArray
()
throws
Exception
{
trace
(
"Test ARRAY"
);
ResultSet
rs
;
stat
.
execute
(
"CREATE TABLE TEST(ID INT PRIMARY KEY, VALUE ARRAY)"
);
PreparedStatement
prep
=
conn
.
prepareStatement
(
"INSERT INTO TEST VALUES(?, ?)"
);
prep
.
setInt
(
1
,
1
);
prep
.
setObject
(
2
,
new
Object
[]{
new
Integer
(
1
),
new
Integer
(
2
)});
prep
.
execute
();
prep
.
setInt
(
1
,
2
);
prep
.
setObject
(
2
,
new
Object
[]{
new
Integer
(
11
),
new
Integer
(
12
)});
prep
.
execute
();
rs
=
stat
.
executeQuery
(
"SELECT * FROM TEST ORDER BY ID"
);
rs
.
next
();
check
(
rs
.
getInt
(
1
),
1
);
Object
[]
list
=
(
Object
[])
rs
.
getObject
(
2
);
check
(((
Integer
)
list
[
0
]).
intValue
(),
1
);
check
(((
Integer
)
list
[
1
]).
intValue
(),
2
);
Array
array
=
rs
.
getArray
(
2
);
Object
[]
list2
=
(
Object
[])
array
.
getArray
();
check
(((
Integer
)
list2
[
0
]).
intValue
(),
1
);
check
(((
Integer
)
list2
[
1
]).
intValue
(),
2
);
list2
=
(
Object
[])
array
.
getArray
(
2
,
1
);
check
(((
Integer
)
list2
[
0
]).
intValue
(),
2
);
rs
.
next
();
check
(
rs
.
getInt
(
1
),
2
);
list
=
(
Object
[])
rs
.
getObject
(
2
);
check
(((
Integer
)
list
[
0
]).
intValue
(),
11
);
check
(((
Integer
)
list
[
1
]).
intValue
(),
12
);
array
=
rs
.
getArray
(
2
);
list2
=
(
Object
[])
array
.
getArray
();
check
(((
Integer
)
list2
[
0
]).
intValue
(),
11
);
check
(((
Integer
)
list2
[
1
]).
intValue
(),
12
);
list2
=
(
Object
[])
array
.
getArray
(
2
,
1
);
check
(((
Integer
)
list2
[
0
]).
intValue
(),
12
);
checkFalse
(
rs
.
next
());
stat
.
execute
(
"DROP TABLE TEST"
);
}
byte
[]
readAllBytes
(
InputStream
in
)
throws
Exception
{
if
(
in
==
null
)
{
return
null
;
...
...
h2/src/test/org/h2/test/synth/TestHalt.java
浏览文件 @
09f43661
...
...
@@ -129,7 +129,7 @@ public abstract class TestHalt extends TestBase {
disconnect
();
for
(
int
i
=
0
;
i
<
10
;
i
++)
{
traceOperation
(
"backing up "
+
sequenceId
);
Backup
.
backupFiles
(
BASE_DIR
+
"/haltSeq"
+
sequenceId
+
".zip"
,
BASE_DIR
,
null
);
Backup
.
execute
(
BASE_DIR
+
"/haltSeq"
+
sequenceId
+
".zip"
,
BASE_DIR
,
null
,
true
);
sequenceId
++;
// int operations = OP_INSERT;
// OP_DELETE = 1, OP_UPDATE = 2, OP_SELECT = 4;
...
...
@@ -155,7 +155,7 @@ public abstract class TestHalt extends TestBase {
p
.
destroy
();
try
{
traceOperation
(
"backing up "
+
sequenceId
);
Backup
.
backupFiles
(
BASE_DIR
+
"/haltSeq"
+
sequenceId
+
".zip"
,
BASE_DIR
,
null
);
Backup
.
execute
(
BASE_DIR
+
"/haltSeq"
+
sequenceId
+
".zip"
,
BASE_DIR
,
null
,
true
);
// new File(BASE_DIR + "/haltSeq" + (sequenceId-20) + ".zip").delete();
connect
();
testCheckAfterCrash
();
...
...
h2/src/test/org/h2/test/unit/TestTools.java
浏览文件 @
09f43661
...
...
@@ -7,7 +7,7 @@ package org.h2.test.unit;
import
java.sql.*
;
import
org.h2.test.TestBase
;
import
org.h2.tools.
Backup
;
import
org.h2.tools.
Script
;
import
org.h2.tools.ChangePassword
;
import
org.h2.tools.DeleteDbFiles
;
import
org.h2.tools.RunScript
;
...
...
@@ -44,9 +44,9 @@ public class TestTools extends TestBase {
conn
.
createStatement
().
execute
(
"CREATE TABLE TEST(ID INT PRIMARY KEY, NAME VARCHAR)"
);
conn
.
createStatement
().
execute
(
"INSERT INTO TEST VALUES(1, 'Hello')"
);
conn
.
close
();
Backup
.
main
(
new
String
[]{
"-url"
,
url
,
"-user"
,
user
,
"-password"
,
password
,
"-script
"
,
fileName
,
"-options"
,
"nodata"
,
"compression"
,
"lzf"
,
"cipher"
,
"xtea"
,
"password"
,
"'123'"
});
Script
.
main
(
new
String
[]{
"-url"
,
url
,
"-user"
,
user
,
"-password"
,
password
,
"-file
"
,
fileName
,
"-options"
,
"nodata"
,
"compression"
,
"lzf"
,
"cipher"
,
"xtea"
,
"password"
,
"'123'"
});
DeleteDbFiles
.
main
(
new
String
[]{
"-dir"
,
BASE_DIR
,
"-db"
,
"utils"
,
"-quiet"
});
RunScript
.
main
(
new
String
[]{
"-url"
,
url
,
"-user"
,
user
,
"-password"
,
password
,
"-
script
"
,
fileName
,
"-options"
,
"compression"
,
"lzf"
,
"cipher"
,
"xtea"
,
"password"
,
"'123'"
});
RunScript
.
main
(
new
String
[]{
"-url"
,
url
,
"-user"
,
user
,
"-password"
,
password
,
"-
file
"
,
fileName
,
"-options"
,
"compression"
,
"lzf"
,
"cipher"
,
"xtea"
,
"password"
,
"'123'"
});
conn
=
DriverManager
.
getConnection
(
"jdbc:h2:"
+
BASE_DIR
+
"/utils"
,
"sa"
,
"abc"
);
ResultSet
rs
=
conn
.
createStatement
().
executeQuery
(
"SELECT * FROM TEST"
);
checkFalse
(
rs
.
next
());
...
...
h2/src/tools/org/h2/tools/doc/dictionary.txt
浏览文件 @
09f43661
...
...
@@ -445,8 +445,19 @@ truncating ronni ptn avalon nielsen hammant picked sequoia continuent deebee pau
lister testa testb tar von
### check those again:
populate slowly xacon inser maxbqualsize counter regards attaching official xatest xids rmerr xadb rdonly occured maxgtridsize bordea con patches suffixer risky
populate slowly xacon inser maxbqualsize counter regards attaching official xatest
xids rmerr xadb rdonly occured maxgtridsize bordea con patches suffixer risky
portuguese parameterized interpret construct maximus seem solo portugu tds
symmetrical printed syb conversions doe ntfs insertquery interested come man
blobtest overload hen datetimes stolen firstly fild mission europe instruct instantiated
recid selectquery msg japan portugal atlas dbsolo henplus soft equivalent watch
createquery securing unambiguously presume umambiguously realised printing
comulative largely perhaps inputting restores observation oversight actuality behaviours
isn truly toptier older meant pavel byteblob benchmarking regarding great unqualified
wanted thoughts europeu astonished acceptable blobtable retrieval wasn demonstrate
incidentally brutal carefully pervasive testlob mydatetime antonio casqueiro sybase fourth
pad microsystems dullesopen rpad spot lpad ganelin sssz testabc pst dumping lots
chdh biz inventec
### evaluatable > evaluable
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论