Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
9a083a0a
提交
9a083a0a
authored
12 年前
作者:
noelgrandin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
variable naming - improve and make consistent
上级
53e07a08
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
13 行增加
和
13 行删除
+13
-13
Analyze.java
h2/src/main/org/h2/command/ddl/Analyze.java
+4
-4
TriggerObject.java
h2/src/main/org/h2/schema/TriggerObject.java
+2
-2
PageStore.java
h2/src/main/org/h2/store/PageStore.java
+4
-4
RecoverTester.java
h2/src/main/org/h2/store/RecoverTester.java
+3
-3
没有找到文件。
h2/src/main/org/h2/command/ddl/Analyze.java
浏览文件 @
9a083a0a
...
...
@@ -106,14 +106,14 @@ public class Analyze extends DefineCommand {
if
(
manual
)
{
db
.
update
(
session
,
table
);
}
else
{
Session
s
=
db
.
getSystemSession
();
if
(
s
!=
session
)
{
Session
s
ysSession
=
db
.
getSystemSession
();
if
(
s
ysSession
!=
session
)
{
// if the current session is the system session
// (which is the case if we are within a trigger)
// then we can't update the statistics because
// that would unlock all locked objects
db
.
update
(
s
,
table
);
s
.
commit
(
true
);
db
.
update
(
s
ysSession
,
table
);
s
ysSession
.
commit
(
true
);
}
}
}
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/schema/TriggerObject.java
浏览文件 @
9a083a0a
...
...
@@ -64,8 +64,8 @@ public class TriggerObject extends SchemaObjectBase {
return
;
}
try
{
Session
session
=
database
.
getSystemSession
();
Connection
c2
=
session
.
createConnection
(
false
);
Session
s
ysS
ession
=
database
.
getSystemSession
();
Connection
c2
=
s
ysS
ession
.
createConnection
(
false
);
Object
obj
=
Utils
.
loadUserClass
(
triggerClassName
).
newInstance
();
triggerCallback
=
(
Trigger
)
obj
;
triggerCallback
.
init
(
c2
,
getSchema
().
getName
(),
getName
(),
table
.
getName
(),
before
,
typeMask
);
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/store/PageStore.java
浏览文件 @
9a083a0a
...
...
@@ -545,17 +545,17 @@ public class PageStore implements CacheWriter {
recordedPagesList
=
New
.
arrayList
();
recordedPagesIndex
=
new
IntIntHashMap
();
recordPageReads
=
true
;
Session
s
=
database
.
getSystemSession
();
Session
s
ysSession
=
database
.
getSystemSession
();
for
(
Table
table
:
tables
)
{
if
(!
table
.
isTemporary
()
&&
Table
.
TABLE
.
equals
(
table
.
getTableType
()))
{
Index
scanIndex
=
table
.
getScanIndex
(
s
);
Cursor
cursor
=
scanIndex
.
find
(
s
,
null
,
null
);
Index
scanIndex
=
table
.
getScanIndex
(
s
ysSession
);
Cursor
cursor
=
scanIndex
.
find
(
s
ysSession
,
null
,
null
);
while
(
cursor
.
next
())
{
cursor
.
get
();
}
for
(
Index
index
:
table
.
getIndexes
())
{
if
(
index
!=
scanIndex
&&
index
.
canScan
())
{
cursor
=
index
.
find
(
s
,
null
,
null
);
cursor
=
index
.
find
(
s
ysSession
,
null
,
null
);
while
(
cursor
.
next
())
{
// the data is already read
}
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/store/RecoverTester.java
浏览文件 @
9a083a0a
...
...
@@ -109,9 +109,9 @@ public class RecoverTester implements Recorder {
ConnectionInfo
ci
=
new
ConnectionInfo
(
"jdbc:h2:"
+
testDatabase
+
";FILE_LOCK=NO;TRACE_LEVEL_FILE=0"
,
p
);
Database
database
=
new
Database
(
ci
,
null
);
// close the database
Session
session
=
database
.
getSystemSession
();
session
.
prepare
(
"script to '"
+
testDatabase
+
".sql'"
).
query
(
0
);
session
.
prepare
(
"shutdown immediately"
).
update
();
Session
s
ysS
ession
=
database
.
getSystemSession
();
s
ysS
ession
.
prepare
(
"script to '"
+
testDatabase
+
".sql'"
).
query
(
0
);
s
ysS
ession
.
prepare
(
"shutdown immediately"
).
update
();
database
.
removeSession
(
null
);
// everything OK - return
return
;
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论