Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
20be82db
提交
20be82db
authored
5月 21, 2018
作者:
Evgenij Ryazanov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Replace trivial usages of SysProperties.CHECK2 with assertions
上级
9ce14802
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
7 行增加
和
33 行删除
+7
-33
Session.java
h2/src/main/org/h2/engine/Session.java
+1
-6
PageDataLeaf.java
h2/src/main/org/h2/index/PageDataLeaf.java
+1
-5
PageDataNode.java
h2/src/main/org/h2/index/PageDataNode.java
+1
-5
Data.java
h2/src/main/org/h2/store/Data.java
+2
-7
LobStorageBackend.java
h2/src/main/org/h2/store/LobStorageBackend.java
+2
-10
没有找到文件。
h2/src/main/org/h2/engine/Session.java
浏览文件 @
20be82db
...
@@ -722,12 +722,7 @@ public class Session extends SessionWithState implements TransactionStore.Rollba
...
@@ -722,12 +722,7 @@ public class Session extends SessionWithState implements TransactionStore.Rollba
}
}
private
void
removeTemporaryLobs
(
boolean
onTimeout
)
{
private
void
removeTemporaryLobs
(
boolean
onTimeout
)
{
if
(
SysProperties
.
CHECK2
)
{
assert
this
!=
getDatabase
().
getLobSession
()
||
Thread
.
holdsLock
(
this
)
||
Thread
.
holdsLock
(
getDatabase
());
if
(
this
==
getDatabase
().
getLobSession
()
&&
!
Thread
.
holdsLock
(
this
)
&&
!
Thread
.
holdsLock
(
getDatabase
()))
{
throw
DbException
.
throwInternalError
();
}
}
if
(
temporaryLobs
!=
null
)
{
if
(
temporaryLobs
!=
null
)
{
for
(
Value
v
:
temporaryLobs
)
{
for
(
Value
v
:
temporaryLobs
)
{
if
(!
v
.
isLinkedToTable
())
{
if
(!
v
.
isLinkedToTable
())
{
...
...
h2/src/main/org/h2/index/PageDataLeaf.java
浏览文件 @
20be82db
...
@@ -491,11 +491,7 @@ public class PageDataLeaf extends PageData {
...
@@ -491,11 +491,7 @@ public class PageDataLeaf extends PageData {
}
}
data
.
writeByte
((
byte
)
type
);
data
.
writeByte
((
byte
)
type
);
data
.
writeShortInt
(
0
);
data
.
writeShortInt
(
0
);
if
(
SysProperties
.
CHECK2
)
{
assert
data
.
length
()
==
START_PARENT
;
if
(
data
.
length
()
!=
START_PARENT
)
{
DbException
.
throwInternalError
();
}
}
data
.
writeInt
(
parentPageId
);
data
.
writeInt
(
parentPageId
);
data
.
writeVarInt
(
index
.
getId
());
data
.
writeVarInt
(
index
.
getId
());
data
.
writeVarInt
(
columnCount
);
data
.
writeVarInt
(
columnCount
);
...
...
h2/src/main/org/h2/index/PageDataNode.java
浏览文件 @
20be82db
...
@@ -351,11 +351,7 @@ public class PageDataNode extends PageData {
...
@@ -351,11 +351,7 @@ public class PageDataNode extends PageData {
data
.
reset
();
data
.
reset
();
data
.
writeByte
((
byte
)
Page
.
TYPE_DATA_NODE
);
data
.
writeByte
((
byte
)
Page
.
TYPE_DATA_NODE
);
data
.
writeShortInt
(
0
);
data
.
writeShortInt
(
0
);
if
(
SysProperties
.
CHECK2
)
{
assert
data
.
length
()
==
START_PARENT
;
if
(
data
.
length
()
!=
START_PARENT
)
{
DbException
.
throwInternalError
();
}
}
data
.
writeInt
(
parentPageId
);
data
.
writeInt
(
parentPageId
);
data
.
writeVarInt
(
index
.
getId
());
data
.
writeVarInt
(
index
.
getId
());
data
.
writeInt
(
rowCountStored
);
data
.
writeInt
(
rowCountStored
);
...
...
h2/src/main/org/h2/store/Data.java
浏览文件 @
20be82db
...
@@ -705,13 +705,8 @@ public class Data {
...
@@ -705,13 +705,8 @@ public class Data {
}
}
DbException
.
throwInternalError
(
"type="
+
v
.
getType
());
DbException
.
throwInternalError
(
"type="
+
v
.
getType
());
}
}
if
(
SysProperties
.
CHECK2
)
{
assert
pos
-
start
==
getValueLen
(
v
,
handler
)
if
(
pos
-
start
!=
getValueLen
(
v
,
handler
))
{
:
"value size error: got "
+
(
pos
-
start
)
+
" expected "
+
getValueLen
(
v
,
handler
);
throw
DbException
.
throwInternalError
(
"value size error: got "
+
(
pos
-
start
)
+
" expected "
+
getValueLen
(
v
,
handler
));
}
}
}
}
/**
/**
...
...
h2/src/main/org/h2/store/LobStorageBackend.java
浏览文件 @
20be82db
...
@@ -249,11 +249,7 @@ public class LobStorageBackend implements LobStorageInterface {
...
@@ -249,11 +249,7 @@ public class LobStorageBackend implements LobStorageInterface {
* @return the prepared statement
* @return the prepared statement
*/
*/
PreparedStatement
prepare
(
String
sql
)
throws
SQLException
{
PreparedStatement
prepare
(
String
sql
)
throws
SQLException
{
if
(
SysProperties
.
CHECK2
)
{
assert
Thread
.
holdsLock
(
database
);
if
(!
Thread
.
holdsLock
(
database
))
{
throw
DbException
.
throwInternalError
();
}
}
PreparedStatement
prep
=
prepared
.
remove
(
sql
);
PreparedStatement
prep
=
prepared
.
remove
(
sql
);
if
(
prep
==
null
)
{
if
(
prep
==
null
)
{
prep
=
conn
.
prepareStatement
(
sql
);
prep
=
conn
.
prepareStatement
(
sql
);
...
@@ -268,11 +264,7 @@ public class LobStorageBackend implements LobStorageInterface {
...
@@ -268,11 +264,7 @@ public class LobStorageBackend implements LobStorageInterface {
* @param prep the prepared statement
* @param prep the prepared statement
*/
*/
void
reuse
(
String
sql
,
PreparedStatement
prep
)
{
void
reuse
(
String
sql
,
PreparedStatement
prep
)
{
if
(
SysProperties
.
CHECK2
)
{
assert
Thread
.
holdsLock
(
database
);
if
(!
Thread
.
holdsLock
(
database
))
{
throw
DbException
.
throwInternalError
();
}
}
prepared
.
put
(
sql
,
prep
);
prepared
.
put
(
sql
,
prep
);
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论