Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
51813804
提交
51813804
authored
9月 17, 2008
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Multi-Version Concurrency (MVCC) may no longer be used when using MULTI_THREADED
上级
30327315
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
15 行增加
和
12 行删除
+15
-12
Database.java
h2/src/main/org/h2/engine/Database.java
+15
-12
没有找到文件。
h2/src/main/org/h2/engine/Database.java
浏览文件 @
51813804
...
...
@@ -197,7 +197,6 @@ public class Database implements DataHandler {
this
.
recovery
=
true
;
}
this
.
multiVersion
=
ci
.
removeProperty
(
"MVCC"
,
false
);
checkMultiThreadedAllowed
();
boolean
closeAtVmShutdown
=
ci
.
removeProperty
(
"DB_CLOSE_ON_EXIT"
,
true
);
int
traceLevelFile
=
ci
.
getIntProperty
(
SetTypes
.
TRACE_LEVEL_FILE
,
TraceSystem
.
DEFAULT_TRACE_LEVEL_FILE
);
int
traceLevelSystemOut
=
ci
.
getIntProperty
(
SetTypes
.
TRACE_LEVEL_SYSTEM_OUT
,
...
...
@@ -789,8 +788,11 @@ public class Database implements DataHandler {
* @param obj the object to add
*/
public
synchronized
void
addSchemaObject
(
Session
session
,
SchemaObject
obj
)
throws
SQLException
{
obj
.
getSchema
().
add
(
obj
);
int
id
=
obj
.
getId
();
if
(
id
>
0
&&
!
starting
)
{
checkWritingAllowed
();
}
obj
.
getSchema
().
add
(
obj
);
if
(
id
>
0
&&
!
starting
)
{
addMeta
(
session
,
obj
);
}
...
...
@@ -803,6 +805,10 @@ public class Database implements DataHandler {
* @param obj the object to add
*/
public
synchronized
void
addDatabaseObject
(
Session
session
,
DbObject
obj
)
throws
SQLException
{
int
id
=
obj
.
getId
();
if
(
id
>
0
&&
!
starting
)
{
checkWritingAllowed
();
}
HashMap
map
=
getMap
(
obj
.
getType
());
if
(
obj
.
getType
()
==
DbObject
.
USER
)
{
User
user
=
(
User
)
obj
;
...
...
@@ -814,7 +820,6 @@ public class Database implements DataHandler {
if
(
SysProperties
.
CHECK
&&
map
.
get
(
name
)
!=
null
)
{
throw
Message
.
getInternalError
(
"object already exists"
);
}
int
id
=
obj
.
getId
();
if
(
id
>
0
&&
!
starting
)
{
addMeta
(
session
,
obj
);
}
...
...
@@ -1309,6 +1314,7 @@ public class Database implements DataHandler {
* @param newName the new name
*/
public
synchronized
void
renameSchemaObject
(
Session
session
,
SchemaObject
obj
,
String
newName
)
throws
SQLException
{
checkWritingAllowed
();
obj
.
getSchema
().
rename
(
obj
,
newName
);
updateWithChildren
(
session
,
obj
);
}
...
...
@@ -1337,6 +1343,7 @@ public class Database implements DataHandler {
* @param newName the new name
*/
public
synchronized
void
renameDatabaseObject
(
Session
session
,
DbObject
obj
,
String
newName
)
throws
SQLException
{
checkWritingAllowed
();
int
type
=
obj
.
getType
();
HashMap
map
=
getMap
(
type
);
if
(
SysProperties
.
CHECK
)
{
...
...
@@ -1447,6 +1454,7 @@ public class Database implements DataHandler {
* @param obj the object to remove
*/
public
synchronized
void
removeDatabaseObject
(
Session
session
,
DbObject
obj
)
throws
SQLException
{
checkWritingAllowed
();
String
objName
=
obj
.
getName
();
int
type
=
obj
.
getType
();
HashMap
map
=
getMap
(
type
);
...
...
@@ -1516,6 +1524,7 @@ public class Database implements DataHandler {
return
;
}
}
checkWritingAllowed
();
Comment
comment
=
findComment
(
obj
);
if
(
comment
!=
null
)
{
removeDatabaseObject
(
session
,
comment
);
...
...
@@ -1952,23 +1961,17 @@ public class Database implements DataHandler {
return
mode
;
}
public
boolean
get
MultiThreaded
()
{
public
boolean
is
MultiThreaded
()
{
return
multiThreaded
;
}
public
void
setMultiThreaded
(
boolean
multiThreaded
)
throws
SQLException
{
this
.
multiThreaded
=
multiThreaded
;
checkMultiThreadedAllowed
();
}
private
void
checkMultiThreadedAllowed
()
throws
SQLException
{
if
(
multiThreaded
&&
multiVersion
)
{
multiVersion
=
false
;
throw
Message
.
getSQLException
(
ErrorCode
.
CANNOT_CHANGE_SETTING_WHEN_OPEN_1
,
"MVCC & MULTI_THREADED"
);
}
this
.
multiThreaded
=
multiThreaded
;
}
public
void
setMaxOperationMemory
(
int
maxOperationMemory
)
{
this
.
maxOperationMemory
=
maxOperationMemory
;
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论