Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
717ee982
Unverified
提交
717ee982
authored
1月 21, 2018
作者:
Noel Grandin
提交者:
GitHub
1月 21, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #799 from katzyn/misc
Use result of ArrayList.remove()
上级
ce5690e6
44ea3a1c
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
8 行增加
和
16 行删除
+8
-16
Parser.java
h2/src/main/org/h2/command/Parser.java
+2
-4
AlterTableAlterColumn.java
h2/src/main/org/h2/command/ddl/AlterTableAlterColumn.java
+1
-2
UndoLog.java
h2/src/main/org/h2/engine/UndoLog.java
+1
-2
Table.java
h2/src/main/org/h2/table/Table.java
+4
-8
没有找到文件。
h2/src/main/org/h2/command/Parser.java
浏览文件 @
717ee982
...
...
@@ -1554,15 +1554,13 @@ public class Parser {
}
while
(
readIf
(
"."
));
schemaName
=
session
.
getCurrentSchemaName
();
if
(
list
.
size
()
==
4
)
{
if
(!
equalsToken
(
database
.
getShortName
(),
list
.
get
(
0
)))
{
if
(!
equalsToken
(
database
.
getShortName
(),
list
.
remove
(
0
)))
{
throw
DbException
.
getSyntaxError
(
sqlCommand
,
parseIndex
,
"database name"
);
}
list
.
remove
(
0
);
}
if
(
list
.
size
()
==
3
)
{
schemaName
=
list
.
get
(
0
);
list
.
remove
(
0
);
schemaName
=
list
.
remove
(
0
);
}
if
(
list
.
size
()
!=
2
)
{
throw
DbException
.
getSyntaxError
(
sqlCommand
,
parseIndex
,
...
...
h2/src/main/org/h2/command/ddl/AlterTableAlterColumn.java
浏览文件 @
717ee982
...
...
@@ -343,8 +343,7 @@ public class AlterTableAlterColumn extends SchemaCommand {
}
}
else
if
(
type
==
CommandInterface
.
ALTER_TABLE_ALTER_COLUMN_CHANGE_TYPE
)
{
int
position
=
oldColumn
.
getColumnId
();
newColumns
.
remove
(
position
);
newColumns
.
add
(
position
,
newColumn
);
newColumns
.
set
(
position
,
newColumn
);
}
// create a table object in order to get the SQL statement
...
...
h2/src/main/org/h2/engine/UndoLog.java
浏览文件 @
717ee982
...
...
@@ -79,8 +79,7 @@ public class UndoLog {
if
(
largeTransactions
)
{
if
(
i
<
0
&&
storedEntries
>
0
)
{
int
last
=
storedEntriesPos
.
size
()
-
1
;
long
pos
=
storedEntriesPos
.
get
(
last
);
storedEntriesPos
.
remove
(
last
);
long
pos
=
storedEntriesPos
.
remove
(
last
);
long
end
=
file
.
length
();
int
bufferLength
=
(
int
)
(
end
-
pos
);
Data
buff
=
Data
.
create
(
database
,
bufferLength
);
...
...
h2/src/main/org/h2/table/Table.java
浏览文件 @
717ee982
...
...
@@ -532,18 +532,15 @@ public abstract class Table extends SchemaObjectBase {
database
.
removeSchemaObject
(
session
,
view
);
}
while
(
synonyms
!=
null
&&
synonyms
.
size
()
>
0
)
{
TableSynonym
synonym
=
synonyms
.
get
(
0
);
synonyms
.
remove
(
0
);
TableSynonym
synonym
=
synonyms
.
remove
(
0
);
database
.
removeSchemaObject
(
session
,
synonym
);
}
while
(
triggers
!=
null
&&
triggers
.
size
()
>
0
)
{
TriggerObject
trigger
=
triggers
.
get
(
0
);
triggers
.
remove
(
0
);
TriggerObject
trigger
=
triggers
.
remove
(
0
);
database
.
removeSchemaObject
(
session
,
trigger
);
}
while
(
constraints
!=
null
&&
constraints
.
size
()
>
0
)
{
Constraint
constraint
=
constraints
.
get
(
0
);
constraints
.
remove
(
0
);
Constraint
constraint
=
constraints
.
remove
(
0
);
database
.
removeSchemaObject
(
session
,
constraint
);
}
for
(
Right
right
:
database
.
getAllRights
())
{
...
...
@@ -555,8 +552,7 @@ public abstract class Table extends SchemaObjectBase {
// must delete sequences later (in case there is a power failure
// before removing the table object)
while
(
sequences
!=
null
&&
sequences
.
size
()
>
0
)
{
Sequence
sequence
=
sequences
.
get
(
0
);
sequences
.
remove
(
0
);
Sequence
sequence
=
sequences
.
remove
(
0
);
// only remove if no other table depends on this sequence
// this is possible when calling ALTER TABLE ALTER COLUMN
if
(
database
.
getDependentTable
(
sequence
,
this
)
==
null
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论