Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
503350ba
提交
503350ba
authored
8月 15, 2009
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Parser: sequenceName.NEXTVAL and CURRVAL did not respect the schema search path.
上级
8b13e264
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
21 行增加
和
12 行删除
+21
-12
changelog.html
h2/src/docsrc/html/changelog.html
+2
-1
Parser.java
h2/src/main/org/h2/command/Parser.java
+19
-11
没有找到文件。
h2/src/docsrc/html/changelog.html
浏览文件 @
503350ba
...
@@ -18,7 +18,8 @@ Change Log
...
@@ -18,7 +18,8 @@ Change Log
<h1>
Change Log
</h1>
<h1>
Change Log
</h1>
<h2>
Next Version (unreleased)
</h2>
<h2>
Next Version (unreleased)
</h2>
<ul><li>
The following sequence could throw the exception "Row not found when trying to delete":
<ul><li>
Parser: sequenceName.NEXTVAL and CURRVAL did not respect the schema search path.
</li><li>
The following sequence could throw the exception "Row not found when trying to delete":
start a transaction, insert many rows, delete many rows, rollback. The number of rows depends
start a transaction, insert many rows, delete many rows, rollback. The number of rows depends
on the cache size.
on the cache size.
</li><li>
The stack trace of very common exceptions is no longer written to the .trace.db file by default.
</li><li>
The stack trace of very common exceptions is no longer written to the .trace.db file by default.
...
...
h2/src/main/org/h2/command/Parser.java
浏览文件 @
503350ba
...
@@ -2102,16 +2102,16 @@ public class Parser {
...
@@ -2102,16 +2102,16 @@ public class Parser {
schema
=
session
.
getCurrentSchemaName
();
schema
=
session
.
getCurrentSchemaName
();
}
}
if
(
readIf
(
"NEXTVAL"
))
{
if
(
readIf
(
"NEXTVAL"
))
{
Sequence
sequence
=
database
.
getSchema
(
schema
).
findSequence
(
objectName
);
Sequence
sequence
=
findSequence
(
schema
,
objectName
);
if
(
sequence
!=
null
)
{
if
(
sequence
!=
null
)
{
return
new
SequenceValue
(
sequence
);
return
new
SequenceValue
(
sequence
);
}
}
}
else
if
(
readIf
(
"CURRVAL"
))
{
}
else
if
(
readIf
(
"CURRVAL"
))
{
Sequence
sequence
=
database
.
getSchema
(
schema
).
findSequence
(
objectName
);
Sequence
sequence
=
findSequence
(
schema
,
objectName
);
if
(
sequence
!=
null
)
{
if
(
sequence
!=
null
)
{
Function
function
=
Function
.
getFunction
(
database
,
"CURRVAL"
);
Function
function
=
Function
.
getFunction
(
database
,
"CURRVAL"
);
function
.
setParameter
(
0
,
ValueExpression
.
get
(
ValueString
.
get
(
s
chema
)));
function
.
setParameter
(
0
,
ValueExpression
.
get
(
ValueString
.
get
(
s
equence
.
getSchema
().
getName
()
)));
function
.
setParameter
(
1
,
ValueExpression
.
get
(
ValueString
.
get
(
objectName
)));
function
.
setParameter
(
1
,
ValueExpression
.
get
(
ValueString
.
get
(
sequence
.
getName
()
)));
function
.
doneWithParameters
();
function
.
doneWithParameters
();
return
function
;
return
function
;
}
}
...
@@ -4265,13 +4265,8 @@ public class Parser {
...
@@ -4265,13 +4265,8 @@ public class Parser {
throw
Message
.
getSQLException
(
ErrorCode
.
TABLE_OR_VIEW_NOT_FOUND_1
,
tableName
);
throw
Message
.
getSQLException
(
ErrorCode
.
TABLE_OR_VIEW_NOT_FOUND_1
,
tableName
);
}
}
private
Sequence
readSequence
()
throws
SQLException
{
private
Sequence
findSequence
(
String
schemaName
,
String
sequenceName
)
throws
SQLException
{
// same algorithm than readTableOrView
Sequence
sequence
=
database
.
getSchema
(
schemaName
).
findSequence
(
sequenceName
);
String
sequenceName
=
readIdentifierWithSchema
(
null
);
if
(
schemaName
!=
null
)
{
return
getSchema
().
getSequence
(
sequenceName
);
}
Sequence
sequence
=
database
.
getSchema
(
session
.
getCurrentSchemaName
()).
findSequence
(
sequenceName
);
if
(
sequence
!=
null
)
{
if
(
sequence
!=
null
)
{
return
sequence
;
return
sequence
;
}
}
...
@@ -4283,6 +4278,19 @@ public class Parser {
...
@@ -4283,6 +4278,19 @@ public class Parser {
return
sequence
;
return
sequence
;
}
}
}
}
return
null
;
}
private
Sequence
readSequence
()
throws
SQLException
{
// same algorithm than readTableOrView
String
sequenceName
=
readIdentifierWithSchema
(
null
);
if
(
schemaName
!=
null
)
{
return
getSchema
().
getSequence
(
sequenceName
);
}
Sequence
sequence
=
findSequence
(
session
.
getCurrentSchemaName
(),
sequenceName
);
if
(
sequence
!=
null
)
{
return
sequence
;
}
throw
Message
.
getSQLException
(
ErrorCode
.
SEQUENCE_NOT_FOUND_1
,
sequenceName
);
throw
Message
.
getSQLException
(
ErrorCode
.
SEQUENCE_NOT_FOUND_1
,
sequenceName
);
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论