Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
2e63b5ff
提交
2e63b5ff
authored
12月 16, 2007
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
--no commit message
上级
fb586555
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
66 行增加
和
11 行删除
+66
-11
_messages_de.properties
h2/src/main/org/h2/res/_messages_de.properties
+1
-0
_messages_ja.properties
h2/src/main/org/h2/res/_messages_ja.properties
+1
-0
_messages_pl.properties
h2/src/main/org/h2/res/_messages_pl.properties
+1
-0
_messages_pt_br.properties
h2/src/main/org/h2/res/_messages_pt_br.properties
+1
-0
TestAll.java
h2/src/test/org/h2/test/TestAll.java
+2
-11
TestExclusive.java
h2/src/test/org/h2/test/db/TestExclusive.java
+60
-0
没有找到文件。
h2/src/main/org/h2/res/_messages_de.properties
浏览文件 @
2e63b5ff
...
@@ -155,6 +155,7 @@
...
@@ -155,6 +155,7 @@
90132
=
Aggregat-Funktion {0} nicht gefunden
90132
=
Aggregat-Funktion {0} nicht gefunden
90133
=
Kann das Setting {0} nicht
\u
00E4ndern wenn die Datenbank bereits ge
\u
00F6ffnet ist
90133
=
Kann das Setting {0} nicht
\u
00E4ndern wenn die Datenbank bereits ge
\u
00F6ffnet ist
90134
=
Der Zugriff auf die Klasse {0} ist nicht erlaubt
90134
=
Der Zugriff auf die Klasse {0} ist nicht erlaubt
90135
=
Die Datenbank befindet sich im Exclusiv Modus; es können keine zusätzlichen Verbindungen geöffnet werden
HY000
=
Allgemeiner Fehler
\:
{0}
HY000
=
Allgemeiner Fehler
\:
{0}
HY004
=
Unbekannter Datentyp
\:
{0}
HY004
=
Unbekannter Datentyp
\:
{0}
HYC00
=
Dieses Feature wird unterst
\u
00FCtzt
HYC00
=
Dieses Feature wird unterst
\u
00FCtzt
...
...
h2/src/main/org/h2/res/_messages_ja.properties
浏览文件 @
2e63b5ff
...
@@ -155,6 +155,7 @@
...
@@ -155,6 +155,7 @@
90132
=
\#
Aggregate {0} not found
90132
=
\#
Aggregate {0} not found
90133
=
\#
Cannot change the setting {0} when the database is already open
90133
=
\#
Cannot change the setting {0} when the database is already open
90134
=
\#
Access to the class {0} is denied
90134
=
\#
Access to the class {0} is denied
90135
=
\#
The database is open in exclusive mode; can not open additional connections
HY000
=
\u
4E00
\u
822C
\u
30A8
\u
30E9
\u
30FC
\:
{0}
HY000
=
\u
4E00
\u
822C
\u
30A8
\u
30E9
\u
30FC
\:
{0}
HY004
=
\u
4E0D
\u
660E
\u
306A
\u
30C7
\u
30FC
\u
30BF
\u
578B
\:
{0}
HY004
=
\u
4E0D
\u
660E
\u
306A
\u
30C7
\u
30FC
\u
30BF
\u
578B
\:
{0}
HYC00
=
\u
6A5F
\u
80FD
\u
306F
\u
30B5
\u
30DD
\u
30FC
\u
30C8
\u3055\u
308C
\u3066\u3044\u
307E
\u
305B
\u3093
HYC00
=
\u
6A5F
\u
80FD
\u
306F
\u
30B5
\u
30DD
\u
30FC
\u
30C8
\u3055\u
308C
\u3066\u3044\u
307E
\u
305B
\u3093
...
...
h2/src/main/org/h2/res/_messages_pl.properties
浏览文件 @
2e63b5ff
...
@@ -155,6 +155,7 @@
...
@@ -155,6 +155,7 @@
90132
=
\#
Aggregate {0} not found
90132
=
\#
Aggregate {0} not found
90133
=
\#
Cannot change the setting {0} when the database is already open
90133
=
\#
Cannot change the setting {0} when the database is already open
90134
=
\#
Access to the class {0} is denied
90134
=
\#
Access to the class {0} is denied
90135
=
\#
The database is open in exclusive mode; can not open additional connections
HY000
=
Blad ogolny
\:
{0}
HY000
=
Blad ogolny
\:
{0}
HY004
=
Nieznany typ danyche
\:
{0}
HY004
=
Nieznany typ danyche
\:
{0}
HYC00
=
Cecha nie jest wspierana
HYC00
=
Cecha nie jest wspierana
...
...
h2/src/main/org/h2/res/_messages_pt_br.properties
浏览文件 @
2e63b5ff
...
@@ -155,6 +155,7 @@
...
@@ -155,6 +155,7 @@
90132
=
Agrega
\u
00E7
\u
00E3o {0} n
\u
00E3o encontrada
90132
=
Agrega
\u
00E7
\u
00E3o {0} n
\u
00E3o encontrada
90133
=
\#
Cannot change the setting {0} when the database is already open
90133
=
\#
Cannot change the setting {0} when the database is already open
90134
=
\#
Access to the class {0} is denied
90134
=
\#
Access to the class {0} is denied
90135
=
\#
The database is open in exclusive mode; can not open additional connections
HY000
=
Erro geral
\:
{0}
HY000
=
Erro geral
\:
{0}
HY004
=
Tipo de dados desconhecido
\:
{0}
HY004
=
Tipo de dados desconhecido
\:
{0}
HYC00
=
Recurso n
\u
00E3o suportado
HYC00
=
Recurso n
\u
00E3o suportado
...
...
h2/src/test/org/h2/test/TestAll.java
浏览文件 @
2e63b5ff
...
@@ -19,6 +19,7 @@ import org.h2.test.db.TestCheckpoint;
...
@@ -19,6 +19,7 @@ import org.h2.test.db.TestCheckpoint;
import
org.h2.test.db.TestCluster
;
import
org.h2.test.db.TestCluster
;
import
org.h2.test.db.TestCompatibility
;
import
org.h2.test.db.TestCompatibility
;
import
org.h2.test.db.TestCsv
;
import
org.h2.test.db.TestCsv
;
import
org.h2.test.db.TestExclusive
;
import
org.h2.test.db.TestFullText
;
import
org.h2.test.db.TestFullText
;
import
org.h2.test.db.TestFunctions
;
import
org.h2.test.db.TestFunctions
;
import
org.h2.test.db.TestIndex
;
import
org.h2.test.db.TestIndex
;
...
@@ -152,17 +153,6 @@ java org.h2.test.TestAll timer
...
@@ -152,17 +153,6 @@ java org.h2.test.TestAll timer
/*
/*
test & document exclusive mode
test exclusive mode (inform_schema.settings table, disallow new connections, delay operations by other,
disable when close session, disable
translate error code 90135
C:\temp\test\db
C:\temp\test\db
Web site:
Web site:
...
@@ -566,6 +556,7 @@ Features of H2
...
@@ -566,6 +556,7 @@ Features of H2
new
TestCluster
().
runTest
(
this
);
new
TestCluster
().
runTest
(
this
);
new
TestCompatibility
().
runTest
(
this
);
new
TestCompatibility
().
runTest
(
this
);
new
TestCsv
().
runTest
(
this
);
new
TestCsv
().
runTest
(
this
);
new
TestExclusive
().
runTest
(
this
);
new
TestFullText
().
runTest
(
this
);
new
TestFullText
().
runTest
(
this
);
new
TestFunctions
().
runTest
(
this
);
new
TestFunctions
().
runTest
(
this
);
new
TestIndex
().
runTest
(
this
);
new
TestIndex
().
runTest
(
this
);
...
...
h2/src/test/org/h2/test/db/TestExclusive.java
0 → 100644
浏览文件 @
2e63b5ff
/*
* Copyright 2004-2007 H2 Group. Licensed under the H2 License, Version 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
org
.
h2
.
test
.
db
;
import
java.sql.Connection
;
import
java.sql.SQLException
;
import
java.sql.Statement
;
import
org.h2.test.TestBase
;
public
class
TestExclusive
extends
TestBase
{
public
void
test
()
throws
Exception
{
deleteDb
(
"exclusive"
);
Connection
conn
=
getConnection
(
"exclusive"
);
Statement
stat
=
conn
.
createStatement
();
stat
.
execute
(
"set exclusive true"
);
try
{
Connection
conn2
=
getConnection
(
"exclusive"
);
conn2
.
close
();
error
(
"unexpected success"
);
}
catch
(
SQLException
e
)
{
checkNotGeneralException
(
e
);
}
stat
.
execute
(
"set exclusive false"
);
Connection
conn2
=
getConnection
(
"exclusive"
);
final
Statement
stat2
=
conn2
.
createStatement
();
stat
.
execute
(
"set exclusive true"
);
final
int
[]
state
=
new
int
[
1
];
Thread
t
=
new
Thread
()
{
public
void
run
()
{
try
{
stat2
.
execute
(
"select * from dual"
);
if
(
state
[
0
]
!=
1
)
{
new
Error
(
"unexpected state: "
+
state
[
0
]).
printStackTrace
();
}
state
[
0
]
=
2
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
};
t
.
start
();
state
[
0
]
=
1
;
stat
.
execute
(
"set exclusive false"
);
Thread
.
sleep
(
100
);
check
(
state
[
0
],
2
);
stat
.
execute
(
"set exclusive true"
);
conn
.
close
();
// check that exclusive mode is off when disconnected
stat2
.
execute
(
"select * from dual"
);
conn2
.
close
();
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论