Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
48006f2f
提交
48006f2f
authored
17 年前
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
--no commit message
上级
73c9811b
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
14 行增加
和
7 行删除
+14
-7
TestCrashAPI.java
h2/src/test/org/h2/test/synth/TestCrashAPI.java
+14
-7
没有找到文件。
h2/src/test/org/h2/test/synth/TestCrashAPI.java
浏览文件 @
48006f2f
...
@@ -27,6 +27,7 @@ import java.util.Calendar;
...
@@ -27,6 +27,7 @@ import java.util.Calendar;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Map
;
import
org.h2.constant.ErrorCode
;
import
org.h2.constant.SysProperties
;
import
org.h2.constant.SysProperties
;
import
org.h2.jdbc.JdbcConnection
;
import
org.h2.jdbc.JdbcConnection
;
import
org.h2.test.TestAll
;
import
org.h2.test.TestAll
;
...
@@ -70,7 +71,9 @@ public class TestCrashAPI extends TestBase {
...
@@ -70,7 +71,9 @@ public class TestCrashAPI extends TestBase {
// int testing;
// int testing;
// add = ";STORAGE=TEXT";
// add = ";STORAGE=TEXT";
// if (openCount >= 33) {
// if(openCount >= 32) {
// int test;
// Runtime.getRuntime().halt(0);
// System.exit(1);
// System.exit(1);
// }
// }
// add = ";LOG=2";
// add = ";LOG=2";
...
@@ -81,6 +84,11 @@ public class TestCrashAPI extends TestBase {
...
@@ -81,6 +84,11 @@ public class TestCrashAPI extends TestBase {
String
url
=
getURL
(
DIR
+
"/crashApi"
+
seed
,
true
)
+
add
;
String
url
=
getURL
(
DIR
+
"/crashApi"
+
seed
,
true
)
+
add
;
// int test;
// url += ";DB_CLOSE_ON_EXIT=FALSE";
// int test;
// url += ";TRACE_LEVEL_FILE=3";
Connection
conn
=
null
;
Connection
conn
=
null
;
// System.gc();
// System.gc();
conn
=
DriverManager
.
getConnection
(
url
,
"sa"
,
""
);
conn
=
DriverManager
.
getConnection
(
url
,
"sa"
,
""
);
...
@@ -114,7 +122,7 @@ public class TestCrashAPI extends TestBase {
...
@@ -114,7 +122,7 @@ public class TestCrashAPI extends TestBase {
String
sql
=
(
String
)
statements
.
get
(
i
);
String
sql
=
(
String
)
statements
.
get
(
i
);
try
{
try
{
// if(openCount == 32
&& i == 1219
) {
// if(openCount == 32) {
// int test;
// int test;
// System.out.println("stop!");
// System.out.println("stop!");
// }
// }
...
@@ -257,17 +265,16 @@ public class TestCrashAPI extends TestBase {
...
@@ -257,17 +265,16 @@ public class TestCrashAPI extends TestBase {
// do nothing
// do nothing
}
else
if
(
t
instanceof
SQLException
)
{
}
else
if
(
t
instanceof
SQLException
)
{
SQLException
s
=
(
SQLException
)
t
;
SQLException
s
=
(
SQLException
)
t
;
String
state
=
s
.
getSQLStat
e
();
int
errorCode
=
s
.
getErrorCod
e
();
if
(
state
==
null
)
{
if
(
errorCode
==
0
)
{
printError
(
seed
,
id
,
s
);
printError
(
seed
,
id
,
s
);
}
else
if
(
state
.
equals
(
"90008"
)
)
{
}
else
if
(
errorCode
==
ErrorCode
.
OBJECT_CLOSED
)
{
if
(
objectId
>=
0
)
{
if
(
objectId
>=
0
)
{
// The object is already closed [90008]
// TODO at least call a few more times after close - maybe
// TODO at least call a few more times after close - maybe
// there is still an error
// there is still an error
objects
.
remove
(
objectId
);
objects
.
remove
(
objectId
);
}
}
}
else
if
(
state
.
equals
(
"HY000"
)
)
{
}
else
if
(
errorCode
==
ErrorCode
.
GENERAL_ERROR_1
)
{
// General error [HY000]
// General error [HY000]
printError
(
seed
,
id
,
s
);
printError
(
seed
,
id
,
s
);
}
}
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论