Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
ccc92707
提交
ccc92707
authored
9月 16, 2013
作者:
noelgrandin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix an LOB deadlock between reading and updating LOB columns.
上级
23cd2f75
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
172 行增加
和
97 行删除
+172
-97
changelog.html
h2/src/docsrc/html/changelog.html
+1
-0
Database.java
h2/src/main/org/h2/engine/Database.java
+21
-4
LobStorageBackend.java
h2/src/main/org/h2/store/LobStorageBackend.java
+150
-93
没有找到文件。
h2/src/docsrc/html/changelog.html
浏览文件 @
ccc92707
...
@@ -65,6 +65,7 @@ Change Log
...
@@ -65,6 +65,7 @@ Change Log
It will now throw an exception.
It will now throw an exception.
</li><li>
Query Statistics: new feature which stores the newest 100 SQL queries executed and their performance data.
</li><li>
Query Statistics: new feature which stores the newest 100 SQL queries executed and their performance data.
Useful for tracking down badly performing queries.
Useful for tracking down badly performing queries.
</li><li>
Fix an LOB deadlock between reading and updating LOB columns.
</li></ul>
</li></ul>
<h2>
Version 1.3.173 (2013-07-28)
</h2>
<h2>
Version 1.3.173 (2013-07-28)
</h2>
...
...
h2/src/main/org/h2/engine/Database.java
浏览文件 @
ccc92707
...
@@ -113,6 +113,7 @@ public class Database implements DataHandler {
...
@@ -113,6 +113,7 @@ public class Database implements DataHandler {
private
int
nextTempTableId
;
private
int
nextTempTableId
;
private
User
systemUser
;
private
User
systemUser
;
private
Session
systemSession
;
private
Session
systemSession
;
private
Session
lobSession
;
private
Table
meta
;
private
Table
meta
;
private
Index
metaIdIndex
;
private
Index
metaIdIndex
;
private
FileLock
lock
;
private
FileLock
lock
;
...
@@ -628,6 +629,7 @@ public class Database implements DataHandler {
...
@@ -628,6 +629,7 @@ public class Database implements DataHandler {
roles
.
put
(
Constants
.
PUBLIC_ROLE_NAME
,
publicRole
);
roles
.
put
(
Constants
.
PUBLIC_ROLE_NAME
,
publicRole
);
systemUser
.
setAdmin
(
true
);
systemUser
.
setAdmin
(
true
);
systemSession
=
new
Session
(
this
,
systemUser
,
++
nextSessionId
);
systemSession
=
new
Session
(
this
,
systemUser
,
++
nextSessionId
);
lobSession
=
new
Session
(
this
,
systemUser
,
++
nextSessionId
);
CreateTableData
data
=
new
CreateTableData
();
CreateTableData
data
=
new
CreateTableData
();
ArrayList
<
Column
>
cols
=
data
.
columns
;
ArrayList
<
Column
>
cols
=
data
.
columns
;
Column
columnId
=
new
Column
(
"ID"
,
Value
.
INT
);
Column
columnId
=
new
Column
(
"ID"
,
Value
.
INT
);
...
@@ -1056,11 +1058,11 @@ public class Database implements DataHandler {
...
@@ -1056,11 +1058,11 @@ public class Database implements DataHandler {
exclusiveSession
=
null
;
exclusiveSession
=
null
;
}
}
userSessions
.
remove
(
session
);
userSessions
.
remove
(
session
);
if
(
session
!=
systemSession
)
{
if
(
session
!=
systemSession
&&
session
!=
lobSession
)
{
trace
.
info
(
"disconnecting session #{0}"
,
session
.
getId
());
trace
.
info
(
"disconnecting session #{0}"
,
session
.
getId
());
}
}
}
}
if
(
userSessions
.
size
()
==
0
&&
session
!=
systemSession
)
{
if
(
userSessions
.
size
()
==
0
&&
session
!=
systemSession
&&
session
!=
lobSession
)
{
if
(
closeDelay
==
0
)
{
if
(
closeDelay
==
0
)
{
close
(
false
);
close
(
false
);
}
else
if
(
closeDelay
<
0
)
{
}
else
if
(
closeDelay
<
0
)
{
...
@@ -1072,7 +1074,7 @@ public class Database implements DataHandler {
...
@@ -1072,7 +1074,7 @@ public class Database implements DataHandler {
delayedCloser
.
start
();
delayedCloser
.
start
();
}
}
}
}
if
(
session
!=
systemSession
&&
session
!=
null
)
{
if
(
session
!=
systemSession
&&
session
!=
lobSession
&&
session
!=
null
)
{
trace
.
info
(
"disconnected session #{0}"
,
session
.
getId
());
trace
.
info
(
"disconnected session #{0}"
,
session
.
getId
());
}
}
}
}
...
@@ -1276,6 +1278,10 @@ public class Database implements DataHandler {
...
@@ -1276,6 +1278,10 @@ public class Database implements DataHandler {
systemSession
.
close
();
systemSession
.
close
();
systemSession
=
null
;
systemSession
=
null
;
}
}
if
(
lobSession
!=
null
)
{
lobSession
.
close
();
lobSession
=
null
;
}
if
(
lock
!=
null
)
{
if
(
lock
!=
null
)
{
if
(
fileLockMethod
==
FileLock
.
LOCK_SERIALIZED
)
{
if
(
fileLockMethod
==
FileLock
.
LOCK_SERIALIZED
)
{
// wait before deleting the .lock file,
// wait before deleting the .lock file,
...
@@ -1461,9 +1467,13 @@ public class Database implements DataHandler {
...
@@ -1461,9 +1467,13 @@ public class Database implements DataHandler {
}
}
// copy, to ensure the reference is stable
// copy, to ensure the reference is stable
Session
sys
=
systemSession
;
Session
sys
=
systemSession
;
Session
lob
=
lobSession
;
if
(
includingSystemSession
&&
sys
!=
null
)
{
if
(
includingSystemSession
&&
sys
!=
null
)
{
list
.
add
(
sys
);
list
.
add
(
sys
);
}
}
if
(
includingSystemSession
&&
lob
!=
null
)
{
list
.
add
(
lob
);
}
Session
[]
array
=
new
Session
[
list
.
size
()];
Session
[]
array
=
new
Session
[
list
.
size
()];
list
.
toArray
(
array
);
list
.
toArray
(
array
);
return
array
;
return
array
;
...
@@ -2475,13 +2485,20 @@ public class Database implements DataHandler {
...
@@ -2475,13 +2485,20 @@ public class Database implements DataHandler {
return
lobStorage
;
return
lobStorage
;
}
}
public
JdbcConnection
getLobConnection
()
{
public
JdbcConnection
getLobConnection
ForInit
()
{
String
url
=
Constants
.
CONN_URL_INTERNAL
;
String
url
=
Constants
.
CONN_URL_INTERNAL
;
JdbcConnection
conn
=
new
JdbcConnection
(
systemSession
,
systemUser
.
getName
(),
url
);
JdbcConnection
conn
=
new
JdbcConnection
(
systemSession
,
systemUser
.
getName
(),
url
);
conn
.
setTraceLevel
(
TraceSystem
.
OFF
);
conn
.
setTraceLevel
(
TraceSystem
.
OFF
);
return
conn
;
return
conn
;
}
}
public
JdbcConnection
getLobConnectionForRegularUse
()
{
String
url
=
Constants
.
CONN_URL_INTERNAL
;
JdbcConnection
conn
=
new
JdbcConnection
(
lobSession
,
systemUser
.
getName
(),
url
);
conn
.
setTraceLevel
(
TraceSystem
.
OFF
);
return
conn
;
}
public
void
setLogMode
(
int
log
)
{
public
void
setLogMode
(
int
log
)
{
if
(
log
<
0
||
log
>
2
)
{
if
(
log
<
0
||
log
>
2
)
{
throw
DbException
.
getInvalidValueException
(
"LOG"
,
log
);
throw
DbException
.
getInvalidValueException
(
"LOG"
,
log
);
...
...
h2/src/main/org/h2/store/LobStorageBackend.java
浏览文件 @
ccc92707
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论