Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
f2fd34ba
提交
f2fd34ba
authored
3月 28, 2014
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Changes to prepare for version 1.4.x beta
上级
d63384b6
隐藏空白字符变更
内嵌
并排
正在显示
33 个修改的文件
包含
89 行增加
和
47 行删除
+89
-47
TestRowLocks.java
h2/src/test/org/h2/test/rowlock/TestRowLocks.java
+1
-1
TestNestedLoop.java
h2/src/test/org/h2/test/server/TestNestedLoop.java
+1
-1
TestWeb.java
h2/src/test/org/h2/test/server/TestWeb.java
+2
-2
TestMVTableEngine.java
h2/src/test/org/h2/test/store/TestMVTableEngine.java
+1
-1
TestCrashAPI.java
h2/src/test/org/h2/test/synth/TestCrashAPI.java
+2
-1
TestDiskFull.java
h2/src/test/org/h2/test/synth/TestDiskFull.java
+2
-1
TestKillRestartMulti.java
h2/src/test/org/h2/test/synth/TestKillRestartMulti.java
+1
-1
TestNestedJoins.java
h2/src/test/org/h2/test/synth/TestNestedJoins.java
+2
-1
TestPowerOffFs.java
h2/src/test/org/h2/test/synth/TestPowerOffFs.java
+2
-1
TestPowerOffFs2.java
h2/src/test/org/h2/test/synth/TestPowerOffFs2.java
+2
-1
TestRandomSQL.java
h2/src/test/org/h2/test/synth/TestRandomSQL.java
+2
-1
TestAutoReconnect.java
h2/src/test/org/h2/test/unit/TestAutoReconnect.java
+1
-1
TestClearReferences.java
h2/src/test/org/h2/test/unit/TestClearReferences.java
+1
-1
TestCollation.java
h2/src/test/org/h2/test/unit/TestCollation.java
+2
-1
TestConcurrent.java
h2/src/test/org/h2/test/unit/TestConcurrent.java
+2
-1
TestConnectionInfo.java
h2/src/test/org/h2/test/unit/TestConnectionInfo.java
+20
-2
TestDataPage.java
h2/src/test/org/h2/test/unit/TestDataPage.java
+1
-1
TestDate.java
h2/src/test/org/h2/test/unit/TestDate.java
+3
-2
TestFileLock.java
h2/src/test/org/h2/test/unit/TestFileLock.java
+2
-1
TestFileLockSerialized.java
h2/src/test/org/h2/test/unit/TestFileLockSerialized.java
+1
-1
TestModifyOnWrite.java
h2/src/test/org/h2/test/unit/TestModifyOnWrite.java
+2
-1
TestOldVersion.java
h2/src/test/org/h2/test/unit/TestOldVersion.java
+2
-1
TestPageStore.java
h2/src/test/org/h2/test/unit/TestPageStore.java
+1
-1
TestPageStoreCoverage.java
h2/src/test/org/h2/test/unit/TestPageStoreCoverage.java
+2
-1
TestPattern.java
h2/src/test/org/h2/test/unit/TestPattern.java
+5
-5
TestReopen.java
h2/src/test/org/h2/test/unit/TestReopen.java
+2
-1
TestSecurity.java
h2/src/test/org/h2/test/unit/TestSecurity.java
+1
-1
TestServlet.java
h2/src/test/org/h2/test/unit/TestServlet.java
+1
-1
TestTools.java
h2/src/test/org/h2/test/unit/TestTools.java
+16
-8
TestValue.java
h2/src/test/org/h2/test/unit/TestValue.java
+3
-1
TestValueHashMap.java
h2/src/test/org/h2/test/unit/TestValueHashMap.java
+1
-1
ArchiveTool.java
h2/src/tools/org/h2/dev/fs/ArchiveTool.java
+1
-1
FileShell.java
h2/src/tools/org/h2/dev/fs/FileShell.java
+1
-1
没有找到文件。
h2/src/test/org/h2/test/rowlock/TestRowLocks.java
浏览文件 @
f2fd34ba
...
...
@@ -11,7 +11,7 @@ import java.sql.ResultSet;
import
java.sql.SQLException
;
import
java.sql.Statement
;
import
org.h2.
constant
.ErrorCode
;
import
org.h2.
api
.ErrorCode
;
import
org.h2.test.TestBase
;
import
org.h2.util.Task
;
...
...
h2/src/test/org/h2/test/server/TestNestedLoop.java
浏览文件 @
f2fd34ba
...
...
@@ -11,7 +11,7 @@ import java.sql.ResultSet;
import
java.sql.SQLException
;
import
java.sql.Statement
;
import
org.h2.
constant
.ErrorCode
;
import
org.h2.
api
.ErrorCode
;
import
org.h2.test.TestBase
;
/**
...
...
h2/src/test/org/h2/test/server/TestWeb.java
浏览文件 @
f2fd34ba
...
...
@@ -35,9 +35,9 @@ import javax.servlet.http.HttpServletResponse;
import
javax.servlet.http.HttpSession
;
import
javax.servlet.ServletContext
;
import
org.h2.constant.ErrorCode
;
import
org.h2.constant.SysProperties
;
import
org.h2.api.ErrorCode
;
import
org.h2.engine.Constants
;
import
org.h2.engine.SysProperties
;
import
org.h2.server.web.WebServlet
;
import
org.h2.store.fs.FileUtils
;
import
org.h2.test.TestBase
;
...
...
h2/src/test/org/h2/test/store/TestMVTableEngine.java
浏览文件 @
f2fd34ba
...
...
@@ -18,7 +18,7 @@ import java.sql.SQLException;
import
java.sql.Savepoint
;
import
java.sql.Statement
;
import
org.h2.
constant
.ErrorCode
;
import
org.h2.
api
.ErrorCode
;
import
org.h2.engine.Constants
;
import
org.h2.engine.Database
;
import
org.h2.jdbc.JdbcConnection
;
...
...
h2/src/test/org/h2/test/synth/TestCrashAPI.java
浏览文件 @
f2fd34ba
...
...
@@ -31,7 +31,8 @@ import java.util.Calendar;
import
java.util.Comparator
;
import
java.util.HashMap
;
import
java.util.Map
;
import
org.h2.constant.ErrorCode
;
import
org.h2.api.ErrorCode
;
import
org.h2.jdbc.JdbcConnection
;
import
org.h2.store.FileLister
;
import
org.h2.store.fs.FileUtils
;
...
...
h2/src/test/org/h2/test/synth/TestDiskFull.java
浏览文件 @
f2fd34ba
...
...
@@ -10,7 +10,8 @@ import java.sql.Connection;
import
java.sql.DriverManager
;
import
java.sql.SQLException
;
import
java.sql.Statement
;
import
org.h2.constant.ErrorCode
;
import
org.h2.api.ErrorCode
;
import
org.h2.test.TestBase
;
import
org.h2.test.utils.FilePathUnstable
;
...
...
h2/src/test/org/h2/test/synth/TestKillRestartMulti.java
浏览文件 @
f2fd34ba
...
...
@@ -15,7 +15,7 @@ import java.sql.Statement;
import
java.util.ArrayList
;
import
java.util.Random
;
import
org.h2.
constant
.ErrorCode
;
import
org.h2.
api
.ErrorCode
;
import
org.h2.store.fs.FileUtils
;
import
org.h2.test.TestBase
;
import
org.h2.test.utils.SelfDestructor
;
...
...
h2/src/test/org/h2/test/synth/TestNestedJoins.java
浏览文件 @
f2fd34ba
...
...
@@ -16,7 +16,8 @@ import java.sql.Statement;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Random
;
import
org.h2.constant.ErrorCode
;
import
org.h2.api.ErrorCode
;
import
org.h2.store.fs.FileUtils
;
import
org.h2.test.TestBase
;
import
org.h2.util.New
;
...
...
h2/src/test/org/h2/test/synth/TestPowerOffFs.java
浏览文件 @
f2fd34ba
...
...
@@ -10,7 +10,8 @@ import java.sql.Connection;
import
java.sql.DriverManager
;
import
java.sql.SQLException
;
import
java.sql.Statement
;
import
org.h2.constant.ErrorCode
;
import
org.h2.api.ErrorCode
;
import
org.h2.test.TestBase
;
import
org.h2.test.utils.FilePathDebug
;
...
...
h2/src/test/org/h2/test/synth/TestPowerOffFs2.java
浏览文件 @
f2fd34ba
...
...
@@ -13,7 +13,8 @@ import java.sql.SQLException;
import
java.sql.Statement
;
import
java.util.ArrayList
;
import
java.util.Random
;
import
org.h2.constant.ErrorCode
;
import
org.h2.api.ErrorCode
;
import
org.h2.test.TestBase
;
import
org.h2.test.utils.FilePathDebug
;
import
org.h2.util.New
;
...
...
h2/src/test/org/h2/test/synth/TestRandomSQL.java
浏览文件 @
f2fd34ba
...
...
@@ -9,7 +9,8 @@ package org.h2.test.synth;
import
java.sql.Connection
;
import
java.sql.SQLException
;
import
java.sql.Statement
;
import
org.h2.constant.SysProperties
;
import
org.h2.engine.SysProperties
;
import
org.h2.store.fs.FileUtils
;
import
org.h2.test.TestAll
;
import
org.h2.test.TestBase
;
...
...
h2/src/test/org/h2/test/unit/TestAutoReconnect.java
浏览文件 @
f2fd34ba
...
...
@@ -12,7 +12,7 @@ import java.sql.ResultSet;
import
java.sql.SQLException
;
import
java.sql.Statement
;
import
org.h2.api.DatabaseEventListener
;
import
org.h2.
constant
.ErrorCode
;
import
org.h2.
api
.ErrorCode
;
import
org.h2.test.TestBase
;
import
org.h2.tools.Server
;
...
...
h2/src/test/org/h2/test/unit/TestClearReferences.java
浏览文件 @
f2fd34ba
...
...
@@ -25,7 +25,7 @@ public class TestClearReferences extends TestBase {
private
static
final
String
[]
KNOWN_REFRESHED
=
{
"org.h2.compress.CompressLZF.cachedHashTable"
,
"org.h2.
constant
.DbSettings.defaultSettings"
,
"org.h2.
engine
.DbSettings.defaultSettings"
,
"org.h2.engine.SessionRemote.sessionFactory"
,
"org.h2.jdbcx.JdbcDataSourceFactory.cachedTraceSystem"
,
"org.h2.store.RecoverTester.instance"
,
...
...
h2/src/test/org/h2/test/unit/TestCollation.java
浏览文件 @
f2fd34ba
...
...
@@ -8,7 +8,8 @@ package org.h2.test.unit;
import
java.sql.Connection
;
import
java.sql.Statement
;
import
org.h2.constant.ErrorCode
;
import
org.h2.api.ErrorCode
;
import
org.h2.test.TestBase
;
/**
...
...
h2/src/test/org/h2/test/unit/TestConcurrent.java
浏览文件 @
f2fd34ba
...
...
@@ -11,7 +11,8 @@ import java.sql.DriverManager;
import
java.sql.PreparedStatement
;
import
java.sql.SQLException
;
import
java.sql.Statement
;
import
org.h2.constant.ErrorCode
;
import
org.h2.api.ErrorCode
;
import
org.h2.test.TestBase
;
import
org.h2.util.Task
;
...
...
h2/src/test/org/h2/test/unit/TestConnectionInfo.java
浏览文件 @
f2fd34ba
...
...
@@ -8,14 +8,18 @@ package org.h2.test.unit;
import
java.io.File
;
import
java.util.Properties
;
import
org.h2.constant.ErrorCode
;
import
org.h2.api.ErrorCode
;
import
org.h2.engine.ConnectionInfo
;
import
org.h2.engine.SysProperties
;
import
org.h2.test.TestBase
;
import
org.h2.tools.DeleteDbFiles
;
/**
* Test the ConnectionInfo class.
*
* @author Kerry Sainsbury
* @author Thomas Mueller Graf
*/
public
class
TestConnectionInfo
extends
TestBase
{
...
...
@@ -30,10 +34,24 @@ public class TestConnectionInfo extends TestBase {
@Override
public
void
test
()
throws
Exception
{
testImplicitRelativePath
();
testConnectInitError
();
testConnectionInfo
();
testName
();
}
private
void
testImplicitRelativePath
()
throws
Exception
{
if
(
SysProperties
.
IMPLICIT_RELATIVE_PATH
)
{
return
;
}
assertThrows
(
ErrorCode
.
URL_RELATIVE_TO_CWD
,
this
).
getConnection
(
"jdbc:h2:test"
);
assertThrows
(
ErrorCode
.
URL_RELATIVE_TO_CWD
,
this
).
getConnection
(
"jdbc:h2:data/test"
);
getConnection
(
"jdbc:h2:./testDatabase"
).
close
();
DeleteDbFiles
.
execute
(
"."
,
"testDatabase"
,
true
);
}
private
void
testConnectInitError
()
throws
Exception
{
assertThrows
(
ErrorCode
.
SYNTAX_ERROR_2
,
this
).
...
...
@@ -69,7 +87,7 @@ public class TestConnectionInfo extends TestBase {
private
void
testName
()
throws
Exception
{
char
differentFileSeparator
=
File
.
separatorChar
==
'/'
?
'\\'
:
'/'
;
ConnectionInfo
connectionInfo
=
new
ConnectionInfo
(
"test"
+
ConnectionInfo
connectionInfo
=
new
ConnectionInfo
(
"
./
test"
+
differentFileSeparator
+
"subDir"
);
File
file
=
new
File
(
"test"
+
File
.
separatorChar
+
"subDir"
);
assertEquals
(
file
.
getCanonicalPath
().
replace
(
'\\'
,
'/'
),
...
...
h2/src/test/org/h2/test/unit/TestDataPage.java
浏览文件 @
f2fd34ba
...
...
@@ -50,7 +50,7 @@ import org.h2.value.ValueUuid;
public
class
TestDataPage
extends
TestBase
implements
DataHandler
{
private
boolean
testPerformance
;
private
final
CompareMode
compareMode
=
CompareMode
.
getInstance
(
null
,
0
,
false
);
private
final
CompareMode
compareMode
=
CompareMode
.
getInstance
(
null
,
0
);
/**
* Run just this test.
...
...
h2/src/test/org/h2/test/unit/TestDate.java
浏览文件 @
f2fd34ba
...
...
@@ -14,8 +14,9 @@ import java.util.ArrayList;
import
java.util.Calendar
;
import
java.util.GregorianCalendar
;
import
java.util.TimeZone
;
import
org.h2.constant.ErrorCode
;
import
org.h2.constant.SysProperties
;
import
org.h2.api.ErrorCode
;
import
org.h2.engine.SysProperties
;
import
org.h2.store.Data
;
import
org.h2.test.TestBase
;
import
org.h2.test.utils.AssertThrows
;
...
...
h2/src/test/org/h2/test/unit/TestFileLock.java
浏览文件 @
f2fd34ba
...
...
@@ -8,7 +8,8 @@ package org.h2.test.unit;
import
java.io.File
;
import
java.sql.Connection
;
import
org.h2.constant.ErrorCode
;
import
org.h2.api.ErrorCode
;
import
org.h2.engine.Constants
;
import
org.h2.message.TraceSystem
;
import
org.h2.store.FileLock
;
...
...
h2/src/test/org/h2/test/unit/TestFileLockSerialized.java
浏览文件 @
f2fd34ba
...
...
@@ -15,7 +15,7 @@ import java.sql.Statement;
import
java.util.List
;
import
java.util.concurrent.CountDownLatch
;
import
org.h2.
constant
.ErrorCode
;
import
org.h2.
api
.ErrorCode
;
import
org.h2.jdbc.JdbcConnection
;
import
org.h2.store.fs.FileUtils
;
import
org.h2.test.TestBase
;
...
...
h2/src/test/org/h2/test/unit/TestModifyOnWrite.java
浏览文件 @
f2fd34ba
...
...
@@ -9,7 +9,8 @@ package org.h2.test.unit;
import
java.sql.Connection
;
import
java.sql.ResultSet
;
import
java.sql.Statement
;
import
org.h2.constant.SysProperties
;
import
org.h2.engine.SysProperties
;
import
org.h2.store.fs.FileUtils
;
import
org.h2.test.TestBase
;
import
org.h2.util.IOUtils
;
...
...
h2/src/test/org/h2/test/unit/TestOldVersion.java
浏览文件 @
f2fd34ba
...
...
@@ -18,7 +18,8 @@ import java.sql.SQLException;
import
java.sql.Statement
;
import
java.sql.Types
;
import
java.util.Properties
;
import
org.h2.constant.ErrorCode
;
import
org.h2.api.ErrorCode
;
import
org.h2.test.TestBase
;
import
org.h2.tools.Server
;
...
...
h2/src/test/org/h2/test/unit/TestPageStore.java
浏览文件 @
f2fd34ba
...
...
@@ -19,7 +19,7 @@ import java.util.Random;
import
java.util.Set
;
import
java.util.TreeSet
;
import
org.h2.api.DatabaseEventListener
;
import
org.h2.
constant
.ErrorCode
;
import
org.h2.
api
.ErrorCode
;
import
org.h2.result.Row
;
import
org.h2.store.Page
;
import
org.h2.store.fs.FileUtils
;
...
...
h2/src/test/org/h2/test/unit/TestPageStoreCoverage.java
浏览文件 @
f2fd34ba
...
...
@@ -11,7 +11,8 @@ import java.sql.Connection;
import
java.sql.ResultSet
;
import
java.sql.SQLException
;
import
java.sql.Statement
;
import
org.h2.constant.ErrorCode
;
import
org.h2.api.ErrorCode
;
import
org.h2.engine.Constants
;
import
org.h2.store.fs.FileUtils
;
import
org.h2.test.TestBase
;
...
...
h2/src/test/org/h2/test/unit/TestPattern.java
浏览文件 @
f2fd34ba
...
...
@@ -33,18 +33,18 @@ public class TestPattern extends TestBase {
private
void
testCompareModeReuse
()
{
CompareMode
mode1
,
mode2
;
mode1
=
CompareMode
.
getInstance
(
null
,
0
,
false
);
mode2
=
CompareMode
.
getInstance
(
null
,
0
,
false
);
mode1
=
CompareMode
.
getInstance
(
null
,
0
);
mode2
=
CompareMode
.
getInstance
(
null
,
0
);
assertTrue
(
mode1
==
mode2
);
mode1
=
CompareMode
.
getInstance
(
"DE"
,
Collator
.
SECONDARY
,
false
);
mode1
=
CompareMode
.
getInstance
(
"DE"
,
Collator
.
SECONDARY
);
assertFalse
(
mode1
==
mode2
);
mode2
=
CompareMode
.
getInstance
(
"DE"
,
Collator
.
SECONDARY
,
false
);
mode2
=
CompareMode
.
getInstance
(
"DE"
,
Collator
.
SECONDARY
);
assertTrue
(
mode1
==
mode2
);
}
private
void
testPattern
()
{
CompareMode
mode
=
CompareMode
.
getInstance
(
null
,
0
,
false
);
CompareMode
mode
=
CompareMode
.
getInstance
(
null
,
0
);
CompareLike
comp
=
new
CompareLike
(
mode
,
"\\"
,
null
,
null
,
null
,
false
);
test
(
comp
,
"B"
,
"%_"
);
test
(
comp
,
"A"
,
"A%"
);
...
...
h2/src/test/org/h2/test/unit/TestReopen.java
浏览文件 @
f2fd34ba
...
...
@@ -9,7 +9,8 @@ package org.h2.test.unit;
import
java.sql.SQLException
;
import
java.util.HashSet
;
import
java.util.Properties
;
import
org.h2.constant.ErrorCode
;
import
org.h2.api.ErrorCode
;
import
org.h2.engine.ConnectionInfo
;
import
org.h2.engine.Constants
;
import
org.h2.engine.Database
;
...
...
h2/src/test/org/h2/test/unit/TestSecurity.java
浏览文件 @
f2fd34ba
...
...
@@ -176,7 +176,7 @@ public class TestSecurity extends TestBase {
}
private
void
testBlockCiphers
()
{
for
(
String
algorithm
:
new
String
[]
{
"AES"
,
"
XTEA"
,
"
FOG"
})
{
for
(
String
algorithm
:
new
String
[]
{
"AES"
,
"FOG"
})
{
byte
[]
test
=
new
byte
[
4096
];
BlockCipher
cipher
=
CipherFactory
.
getBlockCipher
(
algorithm
);
cipher
.
setKey
(
"abcdefghijklmnop"
.
getBytes
());
...
...
h2/src/test/org/h2/test/unit/TestServlet.java
浏览文件 @
f2fd34ba
...
...
@@ -22,7 +22,7 @@ import javax.servlet.Servlet;
import
javax.servlet.ServletContext
;
import
javax.servlet.ServletContextEvent
;
import
org.h2.
constant
.ErrorCode
;
import
org.h2.
api
.ErrorCode
;
import
org.h2.server.web.DbStarter
;
import
org.h2.test.TestBase
;
import
org.h2.util.New
;
...
...
h2/src/test/org/h2/test/unit/TestTools.java
浏览文件 @
f2fd34ba
...
...
@@ -35,8 +35,8 @@ import java.sql.Types;
import
java.util.ArrayList
;
import
java.util.Random
;
import
org.h2.
constant
.ErrorCode
;
import
org.h2.
constant
.SysProperties
;
import
org.h2.
api
.ErrorCode
;
import
org.h2.
engine
.SysProperties
;
import
org.h2.store.FileLister
;
import
org.h2.store.fs.FileUtils
;
import
org.h2.test.TestBase
;
...
...
@@ -79,6 +79,7 @@ public class TestTools extends TestBase {
if
(
config
.
networked
)
{
return
;
}
DeleteDbFiles
.
execute
(
getBaseDir
(),
null
,
true
);
org
.
h2
.
Driver
.
load
();
testSimpleResultSet
();
testTcpServerWithoutPort
();
...
...
@@ -192,6 +193,8 @@ public class TestTools extends TestBase {
createClassProxy
(
rs
.
getClass
());
assertThrows
(
IllegalStateException
.
class
,
rs
).
addColumn
(
null
,
0
,
0
,
0
);
assertEquals
(
ResultSet
.
TYPE_FORWARD_ONLY
,
rs
.
getType
());
rs
.
next
();
assertEquals
(
1
,
rs
.
getInt
(
1
));
assertEquals
(
"1"
,
rs
.
getString
(
1
));
...
...
@@ -219,6 +222,8 @@ public class TestTools extends TestBase {
assertEquals
(
1
,
rs
.
getColumnCount
());
rs
=
new
SimpleResultSet
();
rs
.
setAutoClose
(
false
);
rs
.
addColumn
(
"a"
,
Types
.
BIGINT
,
0
,
0
);
rs
.
addColumn
(
"b"
,
Types
.
BINARY
,
0
,
0
);
rs
.
addColumn
(
"c"
,
Types
.
BOOLEAN
,
0
,
0
);
...
...
@@ -421,9 +426,10 @@ public class TestTools extends TestBase {
}
assertEquals
(
ResultSet
.
FETCH_FORWARD
,
rs
.
getFetchDirection
());
assertEquals
(
0
,
rs
.
getFetchSize
());
assertEquals
(
ResultSet
.
TYPE_
FORWARD_ONLY
,
rs
.
getType
());
assertEquals
(
ResultSet
.
TYPE_
SCROLL_INSENSITIVE
,
rs
.
getType
());
assertTrue
(
rs
.
getStatement
()
==
null
);
assertFalse
(
rs
.
isClosed
());
rs
.
beforeFirst
();
assertEquals
(
0
,
rs
.
getRow
());
assertTrue
(
rs
.
next
());
...
...
@@ -433,8 +439,10 @@ public class TestTools extends TestBase {
assertFalse
(
rs
.
next
());
assertThrows
(
ErrorCode
.
NO_DATA_AVAILABLE
,
(
ResultSet
)
rs
).
getInt
(
1
);
assertTrue
(
rs
.
isClosed
());
assertEquals
(
0
,
rs
.
getRow
());
assertFalse
(
rs
.
isClosed
());
rs
.
close
();
assertTrue
(
rs
.
isClosed
());
}
private
void
testJdbcDriverUtils
()
{
...
...
@@ -835,7 +843,7 @@ public class TestTools extends TestBase {
conn
.
close
();
Script
.
main
(
"-url"
,
url
,
"-user"
,
user
,
"-password"
,
password
,
"-script"
,
fileName
,
"-options"
,
"nodata"
,
"compression"
,
"lzf"
,
"cipher"
,
"
xtea
"
,
"password"
,
"'123'"
,
"charset"
,
"lzf"
,
"cipher"
,
"
aes
"
,
"password"
,
"'123'"
,
"charset"
,
"'utf-8'"
);
Script
.
main
(
"-url"
,
url
,
"-user"
,
user
,
"-password"
,
password
,
"-script"
,
fileName
+
".txt"
);
...
...
@@ -843,7 +851,7 @@ public class TestTools extends TestBase {
"-quiet"
);
RunScript
.
main
(
"-url"
,
url
,
"-user"
,
user
,
"-password"
,
password
,
"-script"
,
fileName
,
"-options"
,
"compression"
,
"lzf"
,
"cipher"
,
"
xtea
"
,
"password"
,
"'123'"
,
"charset"
,
"'utf-8'"
);
"cipher"
,
"
aes
"
,
"password"
,
"'123'"
,
"charset"
,
"'utf-8'"
);
conn
=
getConnection
(
"jdbc:h2:"
+
getBaseDir
()
+
"/testScriptRunscript"
,
"sa"
,
"abc"
);
ResultSet
rs
=
conn
.
createStatement
()
...
...
@@ -906,13 +914,13 @@ public class TestTools extends TestBase {
String
url
=
"jdbc:h2:"
+
dir
;
DeleteDbFiles
.
execute
(
dir
,
"testChangeFileEncryption"
,
true
);
Connection
conn
=
getConnection
(
url
+
"/testChangeFileEncryption;CIPHER=
XTEA
"
,
"sa"
,
"abc 123"
);
"/testChangeFileEncryption;CIPHER=
AES
"
,
"sa"
,
"abc 123"
);
Statement
stat
=
conn
.
createStatement
();
stat
.
execute
(
"CREATE TABLE TEST(ID INT PRIMARY KEY, DATA CLOB) "
+
"AS SELECT X, SPACE(3000) FROM SYSTEM_RANGE(1, 300)"
);
conn
.
close
();
String
[]
args
=
{
"-dir"
,
dir
,
"-db"
,
"testChangeFileEncryption"
,
"-cipher"
,
"
XTEA
"
,
"-decrypt"
,
"abc"
,
"-quiet"
};
"-cipher"
,
"
AES
"
,
"-decrypt"
,
"abc"
,
"-quiet"
};
ChangeFileEncryption
.
main
(
args
);
args
=
new
String
[]
{
"-dir"
,
dir
,
"-db"
,
"testChangeFileEncryption"
,
"-cipher"
,
"AES"
,
"-encrypt"
,
"def"
,
"-quiet"
};
...
...
h2/src/test/org/h2/test/unit/TestValue.java
浏览文件 @
f2fd34ba
...
...
@@ -15,7 +15,8 @@ import java.sql.Time;
import
java.sql.Timestamp
;
import
java.sql.Types
;
import
java.util.UUID
;
import
org.h2.constant.ErrorCode
;
import
org.h2.api.ErrorCode
;
import
org.h2.test.TestBase
;
import
org.h2.test.utils.AssertThrows
;
import
org.h2.tools.SimpleResultSet
;
...
...
@@ -119,6 +120,7 @@ public class TestValue extends TestBase {
private
void
testValueResultSet
()
throws
SQLException
{
SimpleResultSet
rs
=
new
SimpleResultSet
();
rs
.
setAutoClose
(
false
);
rs
.
addColumn
(
"ID"
,
Types
.
INTEGER
,
0
,
0
);
rs
.
addColumn
(
"NAME"
,
Types
.
VARCHAR
,
255
,
0
);
rs
.
addRow
(
1
,
"Hello"
);
...
...
h2/src/test/org/h2/test/unit/TestValueHashMap.java
浏览文件 @
f2fd34ba
...
...
@@ -31,7 +31,7 @@ import org.h2.value.ValueInt;
*/
public
class
TestValueHashMap
extends
TestBase
implements
DataHandler
{
CompareMode
compareMode
=
CompareMode
.
getInstance
(
null
,
0
,
false
);
CompareMode
compareMode
=
CompareMode
.
getInstance
(
null
,
0
);
/**
* Run just this test.
...
...
h2/src/tools/org/h2/dev/fs/ArchiveTool.java
浏览文件 @
f2fd34ba
...
...
@@ -165,7 +165,7 @@ public class ArchiveTool {
}
}
}
// int: metadata length
// byte: 0: directory, 1: file
// varLong: lastModified
...
...
h2/src/tools/org/h2/dev/fs/FileShell.java
浏览文件 @
f2fd34ba
...
...
@@ -22,8 +22,8 @@ import java.util.zip.ZipEntry;
import
java.util.zip.ZipInputStream
;
import
java.util.zip.ZipOutputStream
;
import
org.h2.command.dml.BackupCommand
;
import
org.h2.constant.SysProperties
;
import
org.h2.engine.Constants
;
import
org.h2.engine.SysProperties
;
import
org.h2.message.DbException
;
import
org.h2.store.fs.FileUtils
;
import
org.h2.util.IOUtils
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论