Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
341a5915
提交
341a5915
authored
7 年前
作者:
Owner
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Reverted schema meta lock fix, not needed
上级
d4fb4c1c
无相关合并请求
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
17 行增加
和
35 行删除
+17
-35
Parser.java
h2/src/main/org/h2/command/Parser.java
+1
-1
Schema.java
h2/src/main/org/h2/schema/Schema.java
+16
-34
没有找到文件。
h2/src/main/org/h2/command/Parser.java
浏览文件 @
341a5915
...
@@ -5206,7 +5206,7 @@ public class Parser {
...
@@ -5206,7 +5206,7 @@ public class Parser {
if
(
readIf
(
"("
))
{
if
(
readIf
(
"("
))
{
cols
=
parseColumnList
();
cols
=
parseColumnList
();
for
(
String
c
:
cols
)
{
for
(
String
c
:
cols
)
{
// we don't really know the type of the column, so
UNKNOWN
will
// we don't really know the type of the column, so
STRING
will
// have to do
// have to do
columns
.
add
(
new
Column
(
c
,
Value
.
STRING
));
columns
.
add
(
new
Column
(
c
,
Value
.
STRING
));
}
}
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/schema/Schema.java
浏览文件 @
341a5915
...
@@ -639,44 +639,26 @@ public class Schema extends DbObjectBase {
...
@@ -639,44 +639,26 @@ public class Schema extends DbObjectBase {
* @return the created {@link Table} object
* @return the created {@link Table} object
*/
*/
public
Table
createTable
(
CreateTableData
data
)
{
public
Table
createTable
(
CreateTableData
data
)
{
Database
acquiredMetaLockDatabase
=
null
;
synchronized
(
database
)
{
try
{
if
(!
data
.
temporary
||
data
.
globalTemporary
)
{
synchronized
(
database
)
{
database
.
lockMeta
(
data
.
session
);
if
(!
data
.
temporary
||
data
.
globalTemporary
)
{
}
database
.
lockMeta
(
data
.
session
);
data
.
schema
=
this
;
if
(
data
.
tableEngine
==
null
)
{
// remember to unlock the meta lock before we leave this method
DbSettings
s
=
database
.
getSettings
();
acquiredMetaLockDatabase
=
database
;
if
(
s
.
defaultTableEngine
!=
null
)
{
}
data
.
tableEngine
=
s
.
defaultTableEngine
;
data
.
schema
=
this
;
}
else
if
(
s
.
mvStore
)
{
if
(
data
.
tableEngine
==
null
)
{
data
.
tableEngine
=
MVTableEngine
.
class
.
getName
();
DbSettings
s
=
database
.
getSettings
();
if
(
s
.
defaultTableEngine
!=
null
)
{
data
.
tableEngine
=
s
.
defaultTableEngine
;
}
else
if
(
s
.
mvStore
)
{
data
.
tableEngine
=
MVTableEngine
.
class
.
getName
();
}
}
if
(
data
.
tableEngine
!=
null
)
{
if
(
data
.
tableEngineParams
==
null
)
{
data
.
tableEngineParams
=
this
.
tableEngineParams
;
}
// the createTable method unlocks the meta - so turn off flag now
acquiredMetaLockDatabase
=
null
;
return
database
.
getTableEngine
(
data
.
tableEngine
).
createTable
(
data
);
}
}
// the RegularTable constructor unlocks the meta - so turn off flag now
acquiredMetaLockDatabase
=
null
;
return
new
RegularTable
(
data
);
}
}
}
if
(
data
.
tableEngine
!=
null
)
{
finally
{
if
(
data
.
tableEngineParams
==
null
)
{
if
(
acquiredMetaLockDatabase
!=
null
&&
data
.
session
!=
null
){
data
.
tableEngineParams
=
this
.
tableEngineParams
;
if
(
acquiredMetaLockDatabase
.
isSysTableLockedBy
(
data
.
session
)){
acquiredMetaLockDatabase
.
unlockMeta
(
data
.
session
);
}
}
return
database
.
getTableEngine
(
data
.
tableEngine
).
createTable
(
data
);
}
}
return
new
RegularTable
(
data
);
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论