提交 f66da544 authored 作者: Thomas Mueller's avatar Thomas Mueller

Parser: sequenceName.NEXTVAL and CURRVAL did not respect the schema search path.

上级 062151c3
...@@ -28,6 +28,7 @@ public class TestSequence extends TestBase { ...@@ -28,6 +28,7 @@ public class TestSequence extends TestBase {
} }
public void test() throws SQLException { public void test() throws SQLException {
testSchemaSearchPath();
testAlterSequenceColumn(); testAlterSequenceColumn();
testAlterSequence(); testAlterSequence();
testCache(); testCache();
...@@ -35,6 +36,18 @@ public class TestSequence extends TestBase { ...@@ -35,6 +36,18 @@ public class TestSequence extends TestBase {
deleteDb("sequence"); deleteDb("sequence");
} }
private void testSchemaSearchPath() throws SQLException {
deleteDb("sequence");
Connection conn = getConnection("sequence");
Statement stat = conn.createStatement();
stat.execute("CREATE SCHEMA TEST");
stat.execute("CREATE SEQUENCE TEST.TESTSEQ");
stat.execute("SET SCHEMA_SEARCH_PATH PUBLIC, TEST");
stat.execute("CALL TESTSEQ.NEXTVAL");
stat.execute("CALL TESTSEQ.CURRVAL");
conn.close();
}
private void testAlterSequenceColumn() throws SQLException { private void testAlterSequenceColumn() throws SQLException {
deleteDb("sequence"); deleteDb("sequence");
Connection conn = getConnection("sequence"); Connection conn = getConnection("sequence");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论