Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
9a083a0a
提交
9a083a0a
authored
5月 16, 2013
作者:
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 {
...
@@ -106,14 +106,14 @@ public class Analyze extends DefineCommand {
if
(
manual
)
{
if
(
manual
)
{
db
.
update
(
session
,
table
);
db
.
update
(
session
,
table
);
}
else
{
}
else
{
Session
s
=
db
.
getSystemSession
();
Session
s
ysSession
=
db
.
getSystemSession
();
if
(
s
!=
session
)
{
if
(
s
ysSession
!=
session
)
{
// if the current session is the system session
// if the current session is the system session
// (which is the case if we are within a trigger)
// (which is the case if we are within a trigger)
// then we can't update the statistics because
// then we can't update the statistics because
// that would unlock all locked objects
// that would unlock all locked objects
db
.
update
(
s
,
table
);
db
.
update
(
s
ysSession
,
table
);
s
.
commit
(
true
);
s
ysSession
.
commit
(
true
);
}
}
}
}
}
}
...
...
h2/src/main/org/h2/schema/TriggerObject.java
浏览文件 @
9a083a0a
...
@@ -64,8 +64,8 @@ public class TriggerObject extends SchemaObjectBase {
...
@@ -64,8 +64,8 @@ public class TriggerObject extends SchemaObjectBase {
return
;
return
;
}
}
try
{
try
{
Session
session
=
database
.
getSystemSession
();
Session
s
ysS
ession
=
database
.
getSystemSession
();
Connection
c2
=
session
.
createConnection
(
false
);
Connection
c2
=
s
ysS
ession
.
createConnection
(
false
);
Object
obj
=
Utils
.
loadUserClass
(
triggerClassName
).
newInstance
();
Object
obj
=
Utils
.
loadUserClass
(
triggerClassName
).
newInstance
();
triggerCallback
=
(
Trigger
)
obj
;
triggerCallback
=
(
Trigger
)
obj
;
triggerCallback
.
init
(
c2
,
getSchema
().
getName
(),
getName
(),
table
.
getName
(),
before
,
typeMask
);
triggerCallback
.
init
(
c2
,
getSchema
().
getName
(),
getName
(),
table
.
getName
(),
before
,
typeMask
);
...
...
h2/src/main/org/h2/store/PageStore.java
浏览文件 @
9a083a0a
...
@@ -545,17 +545,17 @@ public class PageStore implements CacheWriter {
...
@@ -545,17 +545,17 @@ public class PageStore implements CacheWriter {
recordedPagesList
=
New
.
arrayList
();
recordedPagesList
=
New
.
arrayList
();
recordedPagesIndex
=
new
IntIntHashMap
();
recordedPagesIndex
=
new
IntIntHashMap
();
recordPageReads
=
true
;
recordPageReads
=
true
;
Session
s
=
database
.
getSystemSession
();
Session
s
ysSession
=
database
.
getSystemSession
();
for
(
Table
table
:
tables
)
{
for
(
Table
table
:
tables
)
{
if
(!
table
.
isTemporary
()
&&
Table
.
TABLE
.
equals
(
table
.
getTableType
()))
{
if
(!
table
.
isTemporary
()
&&
Table
.
TABLE
.
equals
(
table
.
getTableType
()))
{
Index
scanIndex
=
table
.
getScanIndex
(
s
);
Index
scanIndex
=
table
.
getScanIndex
(
s
ysSession
);
Cursor
cursor
=
scanIndex
.
find
(
s
,
null
,
null
);
Cursor
cursor
=
scanIndex
.
find
(
s
ysSession
,
null
,
null
);
while
(
cursor
.
next
())
{
while
(
cursor
.
next
())
{
cursor
.
get
();
cursor
.
get
();
}
}
for
(
Index
index
:
table
.
getIndexes
())
{
for
(
Index
index
:
table
.
getIndexes
())
{
if
(
index
!=
scanIndex
&&
index
.
canScan
())
{
if
(
index
!=
scanIndex
&&
index
.
canScan
())
{
cursor
=
index
.
find
(
s
,
null
,
null
);
cursor
=
index
.
find
(
s
ysSession
,
null
,
null
);
while
(
cursor
.
next
())
{
while
(
cursor
.
next
())
{
// the data is already read
// the data is already read
}
}
...
...
h2/src/main/org/h2/store/RecoverTester.java
浏览文件 @
9a083a0a
...
@@ -109,9 +109,9 @@ public class RecoverTester implements Recorder {
...
@@ -109,9 +109,9 @@ public class RecoverTester implements Recorder {
ConnectionInfo
ci
=
new
ConnectionInfo
(
"jdbc:h2:"
+
testDatabase
+
";FILE_LOCK=NO;TRACE_LEVEL_FILE=0"
,
p
);
ConnectionInfo
ci
=
new
ConnectionInfo
(
"jdbc:h2:"
+
testDatabase
+
";FILE_LOCK=NO;TRACE_LEVEL_FILE=0"
,
p
);
Database
database
=
new
Database
(
ci
,
null
);
Database
database
=
new
Database
(
ci
,
null
);
// close the database
// close the database
Session
session
=
database
.
getSystemSession
();
Session
s
ysS
ession
=
database
.
getSystemSession
();
session
.
prepare
(
"script to '"
+
testDatabase
+
".sql'"
).
query
(
0
);
s
ysS
ession
.
prepare
(
"script to '"
+
testDatabase
+
".sql'"
).
query
(
0
);
session
.
prepare
(
"shutdown immediately"
).
update
();
s
ysS
ession
.
prepare
(
"shutdown immediately"
).
update
();
database
.
removeSession
(
null
);
database
.
removeSession
(
null
);
// everything OK - return
// everything OK - return
return
;
return
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论