Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
ac70b6a8
Unverified
提交
ac70b6a8
authored
6月 16, 2018
作者:
Evgenij Ryazanov
提交者:
GitHub
6月 16, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1207 from katzyn/mvcc
Remove TestAll.mvcc
上级
eaa84649
d409012d
隐藏空白字符变更
内嵌
并排
正在显示
31 个修改的文件
包含
50 行增加
和
85 行删除
+50
-85
TestAll.java
h2/src/test/org/h2/test/TestAll.java
+0
-9
TestBase.java
h2/src/test/org/h2/test/TestBase.java
+0
-3
TestDeadlock.java
h2/src/test/org/h2/test/db/TestDeadlock.java
+4
-4
TestGeneralCommonTableQueries.java
...rc/test/org/h2/test/db/TestGeneralCommonTableQueries.java
+1
-2
TestLargeBlob.java
h2/src/test/org/h2/test/db/TestLargeBlob.java
+1
-1
TestLinkedTable.java
h2/src/test/org/h2/test/db/TestLinkedTable.java
+1
-4
TestLob.java
h2/src/test/org/h2/test/db/TestLob.java
+1
-1
TestMultiThread.java
h2/src/test/org/h2/test/db/TestMultiThread.java
+2
-2
TestMultiThreadedKernel.java
h2/src/test/org/h2/test/db/TestMultiThreadedKernel.java
+0
-3
TestOptimizations.java
h2/src/test/org/h2/test/db/TestOptimizations.java
+1
-1
TestSessionsLocks.java
h2/src/test/org/h2/test/db/TestSessionsLocks.java
+3
-3
TestSpatial.java
h2/src/test/org/h2/test/db/TestSpatial.java
+1
-4
TestTransaction.java
h2/src/test/org/h2/test/db/TestTransaction.java
+3
-3
TestTriggersConstraints.java
h2/src/test/org/h2/test/db/TestTriggersConstraints.java
+1
-1
TestUpgrade.java
h2/src/test/org/h2/test/db/TestUpgrade.java
+0
-1
TestUsingIndex.java
h2/src/test/org/h2/test/db/TestUsingIndex.java
+2
-8
TestMetaData.java
h2/src/test/org/h2/test/jdbc/TestMetaData.java
+1
-1
TestTransactionIsolation.java
h2/src/test/org/h2/test/jdbc/TestTransactionIsolation.java
+1
-1
TestMvcc1.java
h2/src/test/org/h2/test/mvcc/TestMvcc1.java
+3
-4
TestMvcc2.java
h2/src/test/org/h2/test/mvcc/TestMvcc2.java
+1
-2
TestMvcc3.java
h2/src/test/org/h2/test/mvcc/TestMvcc3.java
+5
-6
TestMvcc4.java
h2/src/test/org/h2/test/mvcc/TestMvcc4.java
+1
-2
TestMvccMultiThreaded.java
h2/src/test/org/h2/test/mvcc/TestMvccMultiThreaded.java
+3
-4
TestMvccMultiThreaded2.java
h2/src/test/org/h2/test/mvcc/TestMvccMultiThreaded2.java
+2
-3
TestRowLocks.java
h2/src/test/org/h2/test/rowlock/TestRowLocks.java
+4
-2
TestMVTableEngine.java
h2/src/test/org/h2/test/store/TestMVTableEngine.java
+3
-3
TestCrashAPI.java
h2/src/test/org/h2/test/synth/TestCrashAPI.java
+2
-2
TestMultiThreaded.java
h2/src/test/org/h2/test/synth/TestMultiThreaded.java
+1
-1
TestReleaseSelectLock.java
h2/src/test/org/h2/test/synth/TestReleaseSelectLock.java
+0
-1
TestJmx.java
h2/src/test/org/h2/test/unit/TestJmx.java
+1
-2
TestMultiThreadedKernel.java
h2/src/test/org/h2/test/unit/TestMultiThreadedKernel.java
+1
-1
没有找到文件。
h2/src/test/org/h2/test/TestAll.java
浏览文件 @
ac70b6a8
...
@@ -308,11 +308,6 @@ java org.h2.test.TestAll timer
...
@@ -308,11 +308,6 @@ java org.h2.test.TestAll timer
*/
*/
public
boolean
codeCoverage
;
public
boolean
codeCoverage
;
/**
* If the multi version concurrency control mode should be used.
*/
public
boolean
mvcc
=
mvStore
;
/**
/**
* If the multi-threaded mode should be used.
* If the multi-threaded mode should be used.
*/
*/
...
@@ -644,12 +639,10 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1`
...
@@ -644,12 +639,10 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1`
memory
=
false
;
memory
=
false
;
multiThreaded
=
false
;
multiThreaded
=
false
;
mvStore
=
false
;
mvStore
=
false
;
mvcc
=
false
;
test
();
test
();
testUnit
();
testUnit
();
mvStore
=
true
;
mvStore
=
true
;
mvcc
=
true
;
memory
=
true
;
memory
=
true
;
multiThreaded
=
false
;
multiThreaded
=
false
;
networked
=
true
;
networked
=
true
;
...
@@ -713,7 +706,6 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1`
...
@@ -713,7 +706,6 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1`
multiThreaded
=
false
;
multiThreaded
=
false
;
mvStore
=
false
;
mvStore
=
false
;
mvcc
=
false
;
test
();
test
();
// testUnit();
// testUnit();
}
}
...
@@ -1130,7 +1122,6 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1`
...
@@ -1130,7 +1122,6 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1`
appendIf
(
buff
,
networked
,
"net"
);
appendIf
(
buff
,
networked
,
"net"
);
appendIf
(
buff
,
memory
,
"memory"
);
appendIf
(
buff
,
memory
,
"memory"
);
appendIf
(
buff
,
codeCoverage
,
"codeCoverage"
);
appendIf
(
buff
,
codeCoverage
,
"codeCoverage"
);
appendIf
(
buff
,
mvcc
,
"mvcc"
);
appendIf
(
buff
,
multiThreaded
,
"multiThreaded"
);
appendIf
(
buff
,
multiThreaded
,
"multiThreaded"
);
appendIf
(
buff
,
cipher
!=
null
,
cipher
);
appendIf
(
buff
,
cipher
!=
null
,
cipher
);
appendIf
(
buff
,
cacheType
!=
null
,
cacheType
);
appendIf
(
buff
,
cacheType
!=
null
,
cacheType
);
...
...
h2/src/test/org/h2/test/TestBase.java
浏览文件 @
ac70b6a8
...
@@ -314,9 +314,6 @@ public abstract class TestBase {
...
@@ -314,9 +314,6 @@ public abstract class TestBase {
// force operations to disk
// force operations to disk
url
=
addOption
(
url
,
"MAX_OPERATION_MEMORY"
,
"1"
);
url
=
addOption
(
url
,
"MAX_OPERATION_MEMORY"
,
"1"
);
}
}
if
(
config
.
mvcc
)
{
url
=
addOption
(
url
,
"MVCC"
,
"TRUE"
);
}
url
=
addOption
(
url
,
"MULTI_THREADED"
,
config
.
multiThreaded
?
"TRUE"
:
"FALSE"
);
url
=
addOption
(
url
,
"MULTI_THREADED"
,
config
.
multiThreaded
?
"TRUE"
:
"FALSE"
);
if
(
config
.
lazy
)
{
if
(
config
.
lazy
)
{
url
=
addOption
(
url
,
"LAZY_QUERY_EXECUTION"
,
"1"
);
url
=
addOption
(
url
,
"LAZY_QUERY_EXECUTION"
,
"1"
);
...
...
h2/src/test/org/h2/test/db/TestDeadlock.java
浏览文件 @
ac70b6a8
...
@@ -235,7 +235,7 @@ public class TestDeadlock extends TestBase {
...
@@ -235,7 +235,7 @@ public class TestDeadlock extends TestBase {
}
}
private
void
testThreePhilosophers
()
throws
Exception
{
private
void
testThreePhilosophers
()
throws
Exception
{
if
(
config
.
mv
cc
||
config
.
mv
Store
)
{
if
(
config
.
mvStore
)
{
return
;
return
;
}
}
initTest
();
initTest
();
...
@@ -281,7 +281,7 @@ public class TestDeadlock extends TestBase {
...
@@ -281,7 +281,7 @@ public class TestDeadlock extends TestBase {
// test case for issue # 61
// test case for issue # 61
// http://code.google.com/p/h2database/issues/detail?id=61)
// http://code.google.com/p/h2database/issues/detail?id=61)
private
void
testThreeSome
()
throws
Exception
{
private
void
testThreeSome
()
throws
Exception
{
if
(
config
.
mv
cc
||
config
.
mv
Store
)
{
if
(
config
.
mvStore
)
{
return
;
return
;
}
}
initTest
();
initTest
();
...
@@ -326,7 +326,7 @@ public class TestDeadlock extends TestBase {
...
@@ -326,7 +326,7 @@ public class TestDeadlock extends TestBase {
}
}
private
void
testLockUpgrade
()
throws
Exception
{
private
void
testLockUpgrade
()
throws
Exception
{
if
(
config
.
mv
cc
||
config
.
mv
Store
)
{
if
(
config
.
mvStore
)
{
return
;
return
;
}
}
initTest
();
initTest
();
...
@@ -360,7 +360,7 @@ public class TestDeadlock extends TestBase {
...
@@ -360,7 +360,7 @@ public class TestDeadlock extends TestBase {
}
}
private
void
testDiningPhilosophers
()
throws
Exception
{
private
void
testDiningPhilosophers
()
throws
Exception
{
if
(
config
.
mv
cc
||
config
.
mv
Store
)
{
if
(
config
.
mvStore
)
{
return
;
return
;
}
}
initTest
();
initTest
();
...
...
h2/src/test/org/h2/test/db/TestGeneralCommonTableQueries.java
浏览文件 @
ac70b6a8
...
@@ -529,12 +529,11 @@ public class TestGeneralCommonTableQueries extends AbstractBaseForCommonTableExp
...
@@ -529,12 +529,11 @@ public class TestGeneralCommonTableQueries extends AbstractBaseForCommonTableExp
try
{
try
{
// Test with settings: lazy mvStore memory mvcc multiThreaded
// Test with settings: lazy mvStore memory mvcc multiThreaded
// connection url is
// connection url is
// mem:script;MV_STORE=true;LOG=1;LOCK_TIMEOUT=50;
MVCC=TRUE;
// mem:script;MV_STORE=true;LOG=1;LOCK_TIMEOUT=50;
// MULTI_THREADED=TRUE;LAZY_QUERY_EXECUTION=1
// MULTI_THREADED=TRUE;LAZY_QUERY_EXECUTION=1
config
.
lazy
=
true
;
config
.
lazy
=
true
;
config
.
mvStore
=
true
;
config
.
mvStore
=
true
;
config
.
memory
=
true
;
config
.
memory
=
true
;
config
.
mvcc
=
true
;
config
.
multiThreaded
=
true
;
config
.
multiThreaded
=
true
;
String
setupSQL
=
"--no config set"
;
String
setupSQL
=
"--no config set"
;
...
...
h2/src/test/org/h2/test/db/TestLargeBlob.java
浏览文件 @
ac70b6a8
...
@@ -28,7 +28,7 @@ public class TestLargeBlob extends TestBase {
...
@@ -28,7 +28,7 @@ public class TestLargeBlob extends TestBase {
@Override
@Override
public
void
test
()
throws
Exception
{
public
void
test
()
throws
Exception
{
if
(!
config
.
big
||
config
.
memory
||
config
.
mv
cc
||
config
.
networked
)
{
if
(!
config
.
big
||
config
.
memory
||
config
.
mv
Store
||
config
.
networked
)
{
return
;
return
;
}
}
...
...
h2/src/test/org/h2/test/db/TestLinkedTable.java
浏览文件 @
ac70b6a8
...
@@ -693,10 +693,7 @@ public class TestLinkedTable extends TestBase {
...
@@ -693,10 +693,7 @@ public class TestLinkedTable extends TestBase {
}
}
private
void
testGeometry
()
throws
SQLException
{
private
void
testGeometry
()
throws
SQLException
{
if
(!
config
.
mvStore
&&
config
.
mvcc
)
{
if
(
config
.
memory
&&
config
.
mvStore
)
{
return
;
}
if
(
config
.
memory
&&
config
.
mvcc
)
{
return
;
return
;
}
}
if
(
DataType
.
GEOMETRY_CLASS
==
null
)
{
if
(
DataType
.
GEOMETRY_CLASS
==
null
)
{
...
...
h2/src/test/org/h2/test/db/TestLob.java
浏览文件 @
ac70b6a8
...
@@ -510,7 +510,7 @@ public class TestLob extends TestBase {
...
@@ -510,7 +510,7 @@ public class TestLob extends TestBase {
}
}
private
void
testDeadlock2
()
throws
Exception
{
private
void
testDeadlock2
()
throws
Exception
{
if
(
config
.
mv
cc
||
config
.
memory
)
{
if
(
config
.
mv
Store
||
config
.
memory
)
{
return
;
return
;
}
}
deleteDb
(
"lob"
);
deleteDb
(
"lob"
);
...
...
h2/src/test/org/h2/test/db/TestMultiThread.java
浏览文件 @
ac70b6a8
...
@@ -142,7 +142,7 @@ public class TestMultiThread extends TestBase implements Runnable {
...
@@ -142,7 +142,7 @@ public class TestMultiThread extends TestBase implements Runnable {
}
}
private
void
testConcurrentView
()
throws
Exception
{
private
void
testConcurrentView
()
throws
Exception
{
if
(
config
.
mv
cc
||
config
.
mv
Store
)
{
if
(
config
.
mvStore
)
{
return
;
return
;
}
}
String
db
=
getTestName
();
String
db
=
getTestName
();
...
@@ -206,7 +206,7 @@ public class TestMultiThread extends TestBase implements Runnable {
...
@@ -206,7 +206,7 @@ public class TestMultiThread extends TestBase implements Runnable {
}
}
private
void
testConcurrentAnalyze
()
throws
Exception
{
private
void
testConcurrentAnalyze
()
throws
Exception
{
if
(
config
.
mv
cc
)
{
if
(
config
.
mv
Store
)
{
return
;
return
;
}
}
deleteDb
(
getTestName
());
deleteDb
(
getTestName
());
...
...
h2/src/test/org/h2/test/db/TestMultiThreadedKernel.java
浏览文件 @
ac70b6a8
...
@@ -43,9 +43,6 @@ public class TestMultiThreadedKernel extends TestBase {
...
@@ -43,9 +43,6 @@ public class TestMultiThreadedKernel extends TestBase {
@Override
@Override
public
void
test
()
throws
Exception
{
public
void
test
()
throws
Exception
{
if
(
config
.
mvcc
)
{
return
;
}
if
(
config
.
mvStore
)
{
// FIXME can't see why test should not work in MVStore mode
if
(
config
.
mvStore
)
{
// FIXME can't see why test should not work in MVStore mode
return
;
return
;
}
}
...
...
h2/src/test/org/h2/test/db/TestOptimizations.java
浏览文件 @
ac70b6a8
...
@@ -659,7 +659,7 @@ public class TestOptimizations extends TestBase {
...
@@ -659,7 +659,7 @@ public class TestOptimizations extends TestBase {
ResultSet
rs
=
stat
.
executeQuery
(
ResultSet
rs
=
stat
.
executeQuery
(
"explain select min(x), max(x) from test"
);
"explain select min(x), max(x) from test"
);
rs
.
next
();
rs
.
next
();
if
(!
config
.
mv
cc
)
{
if
(!
config
.
mv
Store
)
{
String
plan
=
rs
.
getString
(
1
);
String
plan
=
rs
.
getString
(
1
);
assertContains
(
plan
,
"direct"
);
assertContains
(
plan
,
"direct"
);
}
}
...
...
h2/src/test/org/h2/test/db/TestSessionsLocks.java
浏览文件 @
ac70b6a8
...
@@ -31,7 +31,7 @@ public class TestSessionsLocks extends TestBase {
...
@@ -31,7 +31,7 @@ public class TestSessionsLocks extends TestBase {
return
;
return
;
}
}
testCancelStatement
();
testCancelStatement
();
if
(!
config
.
mv
cc
)
{
if
(!
config
.
mv
Store
)
{
testLocks
();
testLocks
();
}
}
deleteDb
(
"sessionsLocks"
);
deleteDb
(
"sessionsLocks"
);
...
@@ -56,7 +56,7 @@ public class TestSessionsLocks extends TestBase {
...
@@ -56,7 +56,7 @@ public class TestSessionsLocks extends TestBase {
assertEquals
(
"PUBLIC"
,
rs
.
getString
(
"TABLE_SCHEMA"
));
assertEquals
(
"PUBLIC"
,
rs
.
getString
(
"TABLE_SCHEMA"
));
assertEquals
(
"TEST"
,
rs
.
getString
(
"TABLE_NAME"
));
assertEquals
(
"TEST"
,
rs
.
getString
(
"TABLE_NAME"
));
rs
.
getString
(
"SESSION_ID"
);
rs
.
getString
(
"SESSION_ID"
);
if
(
config
.
mv
cc
||
config
.
mv
Store
)
{
if
(
config
.
mvStore
)
{
assertEquals
(
"READ"
,
rs
.
getString
(
"LOCK_TYPE"
));
assertEquals
(
"READ"
,
rs
.
getString
(
"LOCK_TYPE"
));
}
else
{
}
else
{
assertEquals
(
"WRITE"
,
rs
.
getString
(
"LOCK_TYPE"
));
assertEquals
(
"WRITE"
,
rs
.
getString
(
"LOCK_TYPE"
));
...
@@ -67,7 +67,7 @@ public class TestSessionsLocks extends TestBase {
...
@@ -67,7 +67,7 @@ public class TestSessionsLocks extends TestBase {
stat2
.
execute
(
"SELECT * FROM TEST"
);
stat2
.
execute
(
"SELECT * FROM TEST"
);
rs
=
stat
.
executeQuery
(
"select * from information_schema.locks "
+
rs
=
stat
.
executeQuery
(
"select * from information_schema.locks "
+
"order by session_id"
);
"order by session_id"
);
if
(!
config
.
mv
cc
&&
!
config
.
mv
Store
)
{
if
(!
config
.
mvStore
)
{
rs
.
next
();
rs
.
next
();
assertEquals
(
"PUBLIC"
,
rs
.
getString
(
"TABLE_SCHEMA"
));
assertEquals
(
"PUBLIC"
,
rs
.
getString
(
"TABLE_SCHEMA"
));
assertEquals
(
"TEST"
,
rs
.
getString
(
"TABLE_NAME"
));
assertEquals
(
"TEST"
,
rs
.
getString
(
"TABLE_NAME"
));
...
...
h2/src/test/org/h2/test/db/TestSpatial.java
浏览文件 @
ac70b6a8
...
@@ -53,10 +53,7 @@ public class TestSpatial extends TestBase {
...
@@ -53,10 +53,7 @@ public class TestSpatial extends TestBase {
@Override
@Override
public
void
test
()
throws
SQLException
{
public
void
test
()
throws
SQLException
{
if
(!
config
.
mvStore
&&
config
.
mvcc
)
{
if
(
config
.
memory
&&
config
.
mvStore
)
{
return
;
}
if
(
config
.
memory
&&
config
.
mvcc
)
{
return
;
return
;
}
}
if
(
DataType
.
GEOMETRY_CLASS
!=
null
)
{
if
(
DataType
.
GEOMETRY_CLASS
!=
null
)
{
...
...
h2/src/test/org/h2/test/db/TestTransaction.java
浏览文件 @
ac70b6a8
...
@@ -85,7 +85,7 @@ public class TestTransaction extends TestBase {
...
@@ -85,7 +85,7 @@ public class TestTransaction extends TestBase {
conn
.
setAutoCommit
(
false
);
conn
.
setAutoCommit
(
false
);
ResultSet
rs
;
ResultSet
rs
;
if
(
config
.
mv
cc
||
config
.
mv
Store
)
{
if
(
config
.
mvStore
)
{
rs
=
stat2
.
executeQuery
(
"select count(*) from test"
);
rs
=
stat2
.
executeQuery
(
"select count(*) from test"
);
rs
.
next
();
rs
.
next
();
assertEquals
(
0
,
rs
.
getInt
(
1
));
assertEquals
(
0
,
rs
.
getInt
(
1
));
...
@@ -187,7 +187,7 @@ public class TestTransaction extends TestBase {
...
@@ -187,7 +187,7 @@ public class TestTransaction extends TestBase {
Connection
conn2
=
getConnection
(
"transaction"
);
Connection
conn2
=
getConnection
(
"transaction"
);
conn2
.
setAutoCommit
(
false
);
conn2
.
setAutoCommit
(
false
);
Statement
stat2
=
conn2
.
createStatement
();
Statement
stat2
=
conn2
.
createStatement
();
if
(
config
.
mv
cc
)
{
if
(
config
.
mv
Store
)
{
stat2
.
execute
(
"update test set name = 'Welt' where id = 2"
);
stat2
.
execute
(
"update test set name = 'Welt' where id = 2"
);
}
}
assertThrows
(
ErrorCode
.
LOCK_TIMEOUT_1
,
stat2
).
assertThrows
(
ErrorCode
.
LOCK_TIMEOUT_1
,
stat2
).
...
@@ -321,7 +321,7 @@ public class TestTransaction extends TestBase {
...
@@ -321,7 +321,7 @@ public class TestTransaction extends TestBase {
c2
.
setAutoCommit
(
false
);
c2
.
setAutoCommit
(
false
);
s1
.
executeUpdate
(
"insert into A(code) values('one')"
);
s1
.
executeUpdate
(
"insert into A(code) values('one')"
);
Statement
s2
=
c2
.
createStatement
();
Statement
s2
=
c2
.
createStatement
();
if
(
config
.
mv
cc
||
config
.
mv
Store
)
{
if
(
config
.
mvStore
)
{
assertThrows
(
assertThrows
(
ErrorCode
.
REFERENTIAL_INTEGRITY_VIOLATED_PARENT_MISSING_1
,
s2
).
ErrorCode
.
REFERENTIAL_INTEGRITY_VIOLATED_PARENT_MISSING_1
,
s2
).
executeUpdate
(
"insert into B values('two', 1)"
);
executeUpdate
(
"insert into B values('two', 1)"
);
...
...
h2/src/test/org/h2/test/db/TestTriggersConstraints.java
浏览文件 @
ac70b6a8
...
@@ -111,7 +111,7 @@ public class TestTriggersConstraints extends TestBase implements Trigger {
...
@@ -111,7 +111,7 @@ public class TestTriggersConstraints extends TestBase implements Trigger {
}
}
private
void
testDeleteInTrigger
()
throws
SQLException
{
private
void
testDeleteInTrigger
()
throws
SQLException
{
if
(
config
.
mv
cc
||
config
.
mv
Store
)
{
if
(
config
.
mvStore
)
{
return
;
return
;
}
}
Connection
conn
;
Connection
conn
;
...
...
h2/src/test/org/h2/test/db/TestUpgrade.java
浏览文件 @
ac70b6a8
...
@@ -29,7 +29,6 @@ public class TestUpgrade extends TestBase {
...
@@ -29,7 +29,6 @@ public class TestUpgrade extends TestBase {
*/
*/
public
static
void
main
(
String
...
a
)
throws
Exception
{
public
static
void
main
(
String
...
a
)
throws
Exception
{
TestBase
base
=
TestBase
.
createCaller
().
init
();
TestBase
base
=
TestBase
.
createCaller
().
init
();
base
.
config
.
mvcc
=
false
;
base
.
config
.
mvStore
=
false
;
base
.
config
.
mvStore
=
false
;
base
.
test
();
base
.
test
();
}
}
...
...
h2/src/test/org/h2/test/db/TestUsingIndex.java
浏览文件 @
ac70b6a8
...
@@ -111,10 +111,7 @@ public class TestUsingIndex extends TestBase {
...
@@ -111,10 +111,7 @@ public class TestUsingIndex extends TestBase {
}
}
private
void
testSpatialIndex
()
throws
SQLException
{
private
void
testSpatialIndex
()
throws
SQLException
{
if
(!
config
.
mvStore
&&
config
.
mvcc
)
{
if
(
config
.
memory
&&
config
.
mvStore
)
{
return
;
}
if
(
config
.
memory
&&
config
.
mvcc
)
{
return
;
return
;
}
}
if
(
DataType
.
GEOMETRY_CLASS
==
null
)
{
if
(
DataType
.
GEOMETRY_CLASS
==
null
)
{
...
@@ -147,10 +144,7 @@ public class TestUsingIndex extends TestBase {
...
@@ -147,10 +144,7 @@ public class TestUsingIndex extends TestBase {
}
}
private
void
testBadSpatialSyntax
()
throws
SQLException
{
private
void
testBadSpatialSyntax
()
throws
SQLException
{
if
(!
config
.
mvStore
&&
config
.
mvcc
)
{
if
(
config
.
memory
&&
config
.
mvStore
)
{
return
;
}
if
(
config
.
memory
&&
config
.
mvcc
)
{
return
;
return
;
}
}
if
(
DataType
.
GEOMETRY_CLASS
==
null
)
{
if
(
DataType
.
GEOMETRY_CLASS
==
null
)
{
...
...
h2/src/test/org/h2/test/jdbc/TestMetaData.java
浏览文件 @
ac70b6a8
...
@@ -1271,7 +1271,7 @@ public class TestMetaData extends TestBase {
...
@@ -1271,7 +1271,7 @@ public class TestMetaData extends TestBase {
}
}
private
void
testSessionsUncommitted
()
throws
SQLException
{
private
void
testSessionsUncommitted
()
throws
SQLException
{
if
(
config
.
mv
cc
||
config
.
memory
)
{
if
(
config
.
mv
Store
||
config
.
memory
)
{
return
;
return
;
}
}
Connection
conn
=
getConnection
(
"metaData"
);
Connection
conn
=
getConnection
(
"metaData"
);
...
...
h2/src/test/org/h2/test/jdbc/TestTransactionIsolation.java
浏览文件 @
ac70b6a8
...
@@ -28,7 +28,7 @@ public class TestTransactionIsolation extends TestBase {
...
@@ -28,7 +28,7 @@ public class TestTransactionIsolation extends TestBase {
@Override
@Override
public
void
test
()
throws
SQLException
{
public
void
test
()
throws
SQLException
{
if
(
config
.
mv
cc
||
config
.
mv
Store
)
{
if
(
config
.
mvStore
)
{
// no tests yet
// no tests yet
}
else
{
}
else
{
testTableLevelLocking
();
testTableLevelLocking
();
...
...
h2/src/test/org/h2/test/mvcc/TestMvcc1.java
浏览文件 @
ac70b6a8
...
@@ -30,7 +30,6 @@ public class TestMvcc1 extends TestBase {
...
@@ -30,7 +30,6 @@ public class TestMvcc1 extends TestBase {
*/
*/
public
static
void
main
(
String
...
a
)
throws
Exception
{
public
static
void
main
(
String
...
a
)
throws
Exception
{
TestBase
test
=
TestBase
.
createCaller
().
init
();
TestBase
test
=
TestBase
.
createCaller
().
init
();
test
.
config
.
mvcc
=
true
;
test
.
test
();
test
.
test
();
}
}
...
@@ -59,7 +58,7 @@ public class TestMvcc1 extends TestBase {
...
@@ -59,7 +58,7 @@ public class TestMvcc1 extends TestBase {
}
}
private
void
testCases
()
throws
SQLException
{
private
void
testCases
()
throws
SQLException
{
if
(!
config
.
mv
cc
)
{
if
(!
config
.
mv
Store
)
{
return
;
return
;
}
}
ResultSet
rs
;
ResultSet
rs
;
...
@@ -77,9 +76,9 @@ public class TestMvcc1 extends TestBase {
...
@@ -77,9 +76,9 @@ public class TestMvcc1 extends TestBase {
// selects new data (select * from test where id > ?) and deletes
// selects new data (select * from test where id > ?) and deletes
deleteDb
(
"mvcc1"
);
deleteDb
(
"mvcc1"
);
c1
=
getConnection
(
"mvcc1;
MVCC=TRUE;
LOCK_TIMEOUT=10"
);
c1
=
getConnection
(
"mvcc1;LOCK_TIMEOUT=10"
);
s1
=
c1
.
createStatement
();
s1
=
c1
.
createStatement
();
c2
=
getConnection
(
"mvcc1;
MVCC=TRUE;
LOCK_TIMEOUT=10"
);
c2
=
getConnection
(
"mvcc1;LOCK_TIMEOUT=10"
);
s2
=
c2
.
createStatement
();
s2
=
c2
.
createStatement
();
c1
.
setAutoCommit
(
false
);
c1
.
setAutoCommit
(
false
);
c2
.
setAutoCommit
(
false
);
c2
.
setAutoCommit
(
false
);
...
...
h2/src/test/org/h2/test/mvcc/TestMvcc2.java
浏览文件 @
ac70b6a8
...
@@ -34,13 +34,12 @@ public class TestMvcc2 extends TestBase {
...
@@ -34,13 +34,12 @@ public class TestMvcc2 extends TestBase {
*/
*/
public
static
void
main
(
String
...
a
)
throws
Exception
{
public
static
void
main
(
String
...
a
)
throws
Exception
{
TestBase
test
=
TestBase
.
createCaller
().
init
();
TestBase
test
=
TestBase
.
createCaller
().
init
();
test
.
config
.
mvcc
=
true
;
test
.
test
();
test
.
test
();
}
}
@Override
@Override
public
void
test
()
throws
Exception
{
public
void
test
()
throws
Exception
{
if
(!
config
.
mv
cc
)
{
if
(!
config
.
mv
Store
)
{
return
;
return
;
}
}
deleteDb
(
"mvcc2"
);
deleteDb
(
"mvcc2"
);
...
...
h2/src/test/org/h2/test/mvcc/TestMvcc3.java
浏览文件 @
ac70b6a8
...
@@ -26,7 +26,6 @@ public class TestMvcc3 extends TestBase {
...
@@ -26,7 +26,6 @@ public class TestMvcc3 extends TestBase {
*/
*/
public
static
void
main
(
String
...
a
)
throws
Exception
{
public
static
void
main
(
String
...
a
)
throws
Exception
{
TestBase
test
=
TestBase
.
createCaller
().
init
();
TestBase
test
=
TestBase
.
createCaller
().
init
();
test
.
config
.
mvcc
=
true
;
test
.
test
();
test
.
test
();
}
}
...
@@ -63,7 +62,7 @@ public class TestMvcc3 extends TestBase {
...
@@ -63,7 +62,7 @@ public class TestMvcc3 extends TestBase {
}
}
private
void
testConcurrentUpdate
()
throws
SQLException
{
private
void
testConcurrentUpdate
()
throws
SQLException
{
if
(!
config
.
mv
cc
)
{
if
(!
config
.
mv
Store
)
{
return
;
return
;
}
}
deleteDb
(
"mvcc3"
);
deleteDb
(
"mvcc3"
);
...
@@ -102,7 +101,7 @@ public class TestMvcc3 extends TestBase {
...
@@ -102,7 +101,7 @@ public class TestMvcc3 extends TestBase {
}
}
private
void
testInsertUpdateRollback
()
throws
SQLException
{
private
void
testInsertUpdateRollback
()
throws
SQLException
{
if
(!
config
.
mv
cc
)
{
if
(!
config
.
mv
Store
)
{
return
;
return
;
}
}
...
@@ -147,7 +146,7 @@ public class TestMvcc3 extends TestBase {
...
@@ -147,7 +146,7 @@ public class TestMvcc3 extends TestBase {
}
}
private
void
testCreateTableAsSelect
()
throws
SQLException
{
private
void
testCreateTableAsSelect
()
throws
SQLException
{
if
(!
config
.
mv
cc
)
{
if
(!
config
.
mv
Store
)
{
return
;
return
;
}
}
deleteDb
(
"mvcc3"
);
deleteDb
(
"mvcc3"
);
...
@@ -165,7 +164,7 @@ public class TestMvcc3 extends TestBase {
...
@@ -165,7 +164,7 @@ public class TestMvcc3 extends TestBase {
}
}
private
void
testRollback
()
throws
SQLException
{
private
void
testRollback
()
throws
SQLException
{
if
(!
config
.
mv
cc
)
{
if
(!
config
.
mv
Store
)
{
return
;
return
;
}
}
...
@@ -218,7 +217,7 @@ public class TestMvcc3 extends TestBase {
...
@@ -218,7 +217,7 @@ public class TestMvcc3 extends TestBase {
}
}
private
void
testDisableAutoCommit
()
throws
SQLException
{
private
void
testDisableAutoCommit
()
throws
SQLException
{
if
(!
config
.
mv
cc
)
{
if
(!
config
.
mv
Store
)
{
return
;
return
;
}
}
deleteDb
(
"mvcc3"
);
deleteDb
(
"mvcc3"
);
...
...
h2/src/test/org/h2/test/mvcc/TestMvcc4.java
浏览文件 @
ac70b6a8
...
@@ -26,7 +26,6 @@ public class TestMvcc4 extends TestBase {
...
@@ -26,7 +26,6 @@ public class TestMvcc4 extends TestBase {
*/
*/
public
static
void
main
(
String
...
a
)
throws
Exception
{
public
static
void
main
(
String
...
a
)
throws
Exception
{
TestBase
test
=
TestBase
.
createCaller
().
init
();
TestBase
test
=
TestBase
.
createCaller
().
init
();
test
.
config
.
mvcc
=
true
;
test
.
config
.
lockTimeout
=
20000
;
test
.
config
.
lockTimeout
=
20000
;
test
.
config
.
memory
=
true
;
test
.
config
.
memory
=
true
;
test
.
test
();
test
.
test
();
...
@@ -34,7 +33,7 @@ public class TestMvcc4 extends TestBase {
...
@@ -34,7 +33,7 @@ public class TestMvcc4 extends TestBase {
@Override
@Override
public
void
test
()
throws
SQLException
{
public
void
test
()
throws
SQLException
{
if
(
config
.
networked
||
!
config
.
mv
cc
)
{
if
(
config
.
networked
||
!
config
.
mv
Store
)
{
return
;
return
;
}
}
testSelectForUpdateAndUpdateConcurrency
();
testSelectForUpdateAndUpdateConcurrency
();
...
...
h2/src/test/org/h2/test/mvcc/TestMvccMultiThreaded.java
浏览文件 @
ac70b6a8
...
@@ -30,7 +30,7 @@ public class TestMvccMultiThreaded extends TestBase {
...
@@ -30,7 +30,7 @@ public class TestMvccMultiThreaded extends TestBase {
@Override
@Override
public
void
test
()
throws
Exception
{
public
void
test
()
throws
Exception
{
if
(!
config
.
mv
cc
)
{
if
(!
config
.
mv
Store
)
{
return
;
return
;
}
}
testConcurrentSelectForUpdate
();
testConcurrentSelectForUpdate
();
...
@@ -92,7 +92,7 @@ public class TestMvccMultiThreaded extends TestBase {
...
@@ -92,7 +92,7 @@ public class TestMvccMultiThreaded extends TestBase {
final
Connection
[]
connList
=
new
Connection
[
len
];
final
Connection
[]
connList
=
new
Connection
[
len
];
for
(
int
i
=
0
;
i
<
len
;
i
++)
{
for
(
int
i
=
0
;
i
<
len
;
i
++)
{
Connection
conn
=
getConnection
(
Connection
conn
=
getConnection
(
getTestName
()
+
";
MVCC=TRUE;
LOCK_TIMEOUT=500"
);
getTestName
()
+
";LOCK_TIMEOUT=500"
);
connList
[
i
]
=
conn
;
connList
[
i
]
=
conn
;
}
}
Connection
conn
=
connList
[
0
];
Connection
conn
=
connList
[
0
];
...
@@ -129,8 +129,7 @@ public class TestMvccMultiThreaded extends TestBase {
...
@@ -129,8 +129,7 @@ public class TestMvccMultiThreaded extends TestBase {
int
len
=
2
;
int
len
=
2
;
final
Connection
[]
connList
=
new
Connection
[
len
];
final
Connection
[]
connList
=
new
Connection
[
len
];
for
(
int
i
=
0
;
i
<
len
;
i
++)
{
for
(
int
i
=
0
;
i
<
len
;
i
++)
{
connList
[
i
]
=
getConnection
(
connList
[
i
]
=
getConnection
(
getTestName
());
getTestName
()
+
";MVCC=TRUE"
);
}
}
Connection
conn
=
connList
[
0
];
Connection
conn
=
connList
[
0
];
conn
.
createStatement
().
execute
(
conn
.
createStatement
().
execute
(
...
...
h2/src/test/org/h2/test/mvcc/TestMvccMultiThreaded2.java
浏览文件 @
ac70b6a8
...
@@ -24,7 +24,7 @@ public class TestMvccMultiThreaded2 extends TestBase {
...
@@ -24,7 +24,7 @@ public class TestMvccMultiThreaded2 extends TestBase {
private
static
final
int
TEST_TIME_SECONDS
=
60
;
private
static
final
int
TEST_TIME_SECONDS
=
60
;
private
static
final
boolean
DISPLAY_STATS
=
false
;
private
static
final
boolean
DISPLAY_STATS
=
false
;
private
static
final
String
URL
=
";
MVCC=TRUE;
LOCK_TIMEOUT=120000;MULTI_THREADED=TRUE"
;
private
static
final
String
URL
=
";LOCK_TIMEOUT=120000;MULTI_THREADED=TRUE"
;
/**
/**
* Run just this test.
* Run just this test.
...
@@ -33,7 +33,6 @@ public class TestMvccMultiThreaded2 extends TestBase {
...
@@ -33,7 +33,6 @@ public class TestMvccMultiThreaded2 extends TestBase {
*/
*/
public
static
void
main
(
String
...
a
)
throws
Exception
{
public
static
void
main
(
String
...
a
)
throws
Exception
{
TestBase
test
=
TestBase
.
createCaller
().
init
();
TestBase
test
=
TestBase
.
createCaller
().
init
();
test
.
config
.
mvcc
=
true
;
test
.
config
.
lockTimeout
=
120000
;
test
.
config
.
lockTimeout
=
120000
;
test
.
config
.
memory
=
true
;
test
.
config
.
memory
=
true
;
test
.
config
.
multiThreaded
=
true
;
test
.
config
.
multiThreaded
=
true
;
...
@@ -47,7 +46,7 @@ public class TestMvccMultiThreaded2 extends TestBase {
...
@@ -47,7 +46,7 @@ public class TestMvccMultiThreaded2 extends TestBase {
@Override
@Override
public
void
test
()
throws
SQLException
,
InterruptedException
{
public
void
test
()
throws
SQLException
,
InterruptedException
{
if
(!
config
.
mv
cc
)
{
if
(!
config
.
mv
Store
)
{
return
;
return
;
}
}
testSelectForUpdateConcurrency
();
testSelectForUpdateConcurrency
();
...
...
h2/src/test/org/h2/test/rowlock/TestRowLocks.java
浏览文件 @
ac70b6a8
...
@@ -38,7 +38,9 @@ public class TestRowLocks extends TestBase {
...
@@ -38,7 +38,9 @@ public class TestRowLocks extends TestBase {
@Override
@Override
public
void
test
()
throws
Exception
{
public
void
test
()
throws
Exception
{
testSetMode
();
testSetMode
();
testCases
();
if
(
config
.
mvStore
)
{
testCases
();
}
deleteDb
(
getTestName
());
deleteDb
(
getTestName
());
}
}
...
@@ -55,7 +57,7 @@ public class TestRowLocks extends TestBase {
...
@@ -55,7 +57,7 @@ public class TestRowLocks extends TestBase {
private
void
testCases
()
throws
Exception
{
private
void
testCases
()
throws
Exception
{
deleteDb
(
getTestName
());
deleteDb
(
getTestName
());
c1
=
getConnection
(
getTestName
()
+
";MVCC=TRUE"
);
c1
=
getConnection
(
getTestName
());
s1
=
c1
.
createStatement
();
s1
=
c1
.
createStatement
();
s1
.
execute
(
"SET LOCK_TIMEOUT 10000"
);
s1
.
execute
(
"SET LOCK_TIMEOUT 10000"
);
s1
.
execute
(
"CREATE TABLE TEST AS "
+
s1
.
execute
(
"CREATE TABLE TEST AS "
+
...
...
h2/src/test/org/h2/test/store/TestMVTableEngine.java
浏览文件 @
ac70b6a8
...
@@ -506,7 +506,7 @@ public class TestMVTableEngine extends TestBase {
...
@@ -506,7 +506,7 @@ public class TestMVTableEngine extends TestBase {
Statement
stat
;
Statement
stat
;
Statement
stat2
;
Statement
stat2
;
deleteDb
(
getTestName
());
deleteDb
(
getTestName
());
String
url
=
getTestName
()
+
";MV_STORE=TRUE
;MVCC=TRUE
"
;
String
url
=
getTestName
()
+
";MV_STORE=TRUE"
;
url
=
getURL
(
url
,
true
);
url
=
getURL
(
url
,
true
);
conn
=
getConnection
(
url
);
conn
=
getConnection
(
url
);
stat
=
conn
.
createStatement
();
stat
=
conn
.
createStatement
();
...
@@ -563,7 +563,7 @@ public class TestMVTableEngine extends TestBase {
...
@@ -563,7 +563,7 @@ public class TestMVTableEngine extends TestBase {
Statement
stat
;
Statement
stat
;
Statement
stat2
;
Statement
stat2
;
deleteDb
(
getTestName
());
deleteDb
(
getTestName
());
String
url
=
getTestName
()
+
";MV_STORE=TRUE
;MVCC=TRUE
"
;
String
url
=
getTestName
()
+
";MV_STORE=TRUE"
;
url
=
getURL
(
url
,
true
);
url
=
getURL
(
url
,
true
);
conn
=
getConnection
(
url
);
conn
=
getConnection
(
url
);
stat
=
conn
.
createStatement
();
stat
=
conn
.
createStatement
();
...
@@ -593,7 +593,7 @@ public class TestMVTableEngine extends TestBase {
...
@@ -593,7 +593,7 @@ public class TestMVTableEngine extends TestBase {
Statement
stat
;
Statement
stat
;
Statement
stat2
;
Statement
stat2
;
deleteDb
(
getTestName
());
deleteDb
(
getTestName
());
String
url
=
getTestName
()
+
";MV_STORE=TRUE
;MVCC=TRUE
"
;
String
url
=
getTestName
()
+
";MV_STORE=TRUE"
;
url
=
getURL
(
url
,
true
);
url
=
getURL
(
url
,
true
);
conn
=
getConnection
(
url
);
conn
=
getConnection
(
url
);
stat
=
conn
.
createStatement
();
stat
=
conn
.
createStatement
();
...
...
h2/src/test/org/h2/test/synth/TestCrashAPI.java
浏览文件 @
ac70b6a8
...
@@ -154,7 +154,7 @@ public class TestCrashAPI extends TestBase implements Runnable {
...
@@ -154,7 +154,7 @@ public class TestCrashAPI extends TestBase implements Runnable {
recoverAll
();
recoverAll
();
return
;
return
;
}
}
if
(
config
.
mv
cc
||
config
.
networked
)
{
if
(
config
.
mv
Store
||
config
.
networked
)
{
return
;
return
;
}
}
int
len
=
getSize
(
2
,
6
);
int
len
=
getSize
(
2
,
6
);
...
@@ -531,7 +531,7 @@ public class TestCrashAPI extends TestBase implements Runnable {
...
@@ -531,7 +531,7 @@ public class TestCrashAPI extends TestBase implements Runnable {
@Override
@Override
public
TestBase
init
(
TestAll
conf
)
throws
Exception
{
public
TestBase
init
(
TestAll
conf
)
throws
Exception
{
super
.
init
(
conf
);
super
.
init
(
conf
);
if
(
config
.
mv
cc
||
config
.
networked
)
{
if
(
config
.
mv
Store
||
config
.
networked
)
{
return
this
;
return
this
;
}
}
startServerIfRequired
();
startServerIfRequired
();
...
...
h2/src/test/org/h2/test/synth/TestMultiThreaded.java
浏览文件 @
ac70b6a8
...
@@ -123,7 +123,7 @@ public class TestMultiThreaded extends TestBase {
...
@@ -123,7 +123,7 @@ public class TestMultiThreaded extends TestBase {
@Override
@Override
public
void
test
()
throws
Exception
{
public
void
test
()
throws
Exception
{
if
(
config
.
mv
cc
)
{
if
(
config
.
mv
Store
)
{
return
;
return
;
}
}
deleteDb
(
"multiThreaded"
);
deleteDb
(
"multiThreaded"
);
...
...
h2/src/test/org/h2/test/synth/TestReleaseSelectLock.java
浏览文件 @
ac70b6a8
...
@@ -27,7 +27,6 @@ public class TestReleaseSelectLock extends TestBase {
...
@@ -27,7 +27,6 @@ public class TestReleaseSelectLock extends TestBase {
public
static
void
main
(
String
...
a
)
throws
Exception
{
public
static
void
main
(
String
...
a
)
throws
Exception
{
TestBase
test
=
TestBase
.
createCaller
().
init
();
TestBase
test
=
TestBase
.
createCaller
().
init
();
test
.
config
.
mvStore
=
false
;
test
.
config
.
mvStore
=
false
;
test
.
config
.
mvcc
=
false
;
test
.
config
.
multiThreaded
=
true
;
test
.
config
.
multiThreaded
=
true
;
test
.
test
();
test
.
test
();
}
}
...
...
h2/src/test/org/h2/test/unit/TestJmx.java
浏览文件 @
ac70b6a8
...
@@ -33,7 +33,6 @@ public class TestJmx extends TestBase {
...
@@ -33,7 +33,6 @@ public class TestJmx extends TestBase {
public
static
void
main
(
String
...
a
)
throws
Exception
{
public
static
void
main
(
String
...
a
)
throws
Exception
{
TestBase
base
=
TestBase
.
createCaller
().
init
();
TestBase
base
=
TestBase
.
createCaller
().
init
();
base
.
config
.
mvStore
=
false
;
base
.
config
.
mvStore
=
false
;
base
.
config
.
mvcc
=
false
;
base
.
test
();
base
.
test
();
}
}
...
@@ -114,7 +113,7 @@ public class TestJmx extends TestBase {
...
@@ -114,7 +113,7 @@ public class TestJmx extends TestBase {
result
=
mbeanServer
.
invoke
(
name
,
"listSessions"
,
null
,
null
).
toString
();
result
=
mbeanServer
.
invoke
(
name
,
"listSessions"
,
null
,
null
).
toString
();
assertContains
(
result
,
"session id"
);
assertContains
(
result
,
"session id"
);
if
(
config
.
mv
cc
||
config
.
mv
Store
)
{
if
(
config
.
mvStore
)
{
assertContains
(
result
,
"read lock"
);
assertContains
(
result
,
"read lock"
);
}
else
{
}
else
{
assertContains
(
result
,
"write lock"
);
assertContains
(
result
,
"write lock"
);
...
...
h2/src/test/org/h2/test/unit/TestMultiThreadedKernel.java
浏览文件 @
ac70b6a8
...
@@ -33,7 +33,7 @@ public class TestMultiThreadedKernel extends TestBase implements Runnable {
...
@@ -33,7 +33,7 @@ public class TestMultiThreadedKernel extends TestBase implements Runnable {
@Override
@Override
public
void
test
()
throws
Exception
{
public
void
test
()
throws
Exception
{
if
(
config
.
networked
||
config
.
mv
cc
)
{
if
(
config
.
networked
||
config
.
mv
Store
)
{
return
;
return
;
}
}
deleteDb
(
"multiThreadedKernel"
);
deleteDb
(
"multiThreadedKernel"
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论