You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixed error while using PosgreSQL reserved keyword in cursor operations
During the cursor prepare, execution flow for statement is not passed through antlr parser. This causes issue when query contains PosgreSQL reserved keywords. This PR addresses this issue, along with any potential issue with query which is not compatible with PostgreSQL
Task: BABEL-5743
Signed-off-by: Shard Gupta shardga@amazon.com
cursor#!#open#!#prepst#!#SELECT a year, b month, c quarter from test_cursor_prep_exec_fetch_next#!#TYPE_SCROLL_INSENSITIVE#!#CONCUR_READ_ONLY#!#CLOSE_CURSORS_AT_COMMIT
# Cursor with multiple selects should return error
321
+
cursor#!#open#!#prepst#!#SELECT * FROM test_cursor_prep_exec_fetch_next;SELECT a FROM test_cursor_prep_exec_fetch_next#!#TYPE_SCROLL_INSENSITIVE#!#CONCUR_READ_ONLY#!#CLOSE_CURSORS_AT_COMMIT
322
+
~~ERROR (Code: 33557097)~~
323
+
324
+
~~ERROR (Message: cannot open multi-query plan as cursor)~~
Copy file name to clipboardExpand all lines: test/JDBC/input/cursors/TestCursorPrepExecFetchNext.txt
+11Lines changed: 11 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,14 @@ cursor#!#fetch#!#next
23
23
#cursor#!#fetch#!#afterlast
24
24
#cursor#!#fetch#!#next
25
25
cursor#!#close
26
+
cursor#!#open#!#prepst#!#SELECT a year, b month, c quarter from test_cursor_prep_exec_fetch_next#!#TYPE_SCROLL_INSENSITIVE#!#CONCUR_READ_ONLY#!#CLOSE_CURSORS_AT_COMMIT
CREATE TABLE test_cursor_prep_exec_fetch_next(a CHAR(30), b VARCHAR(30), c NCHAR(30), d NVARCHAR(30));
@@ -94,4 +102,7 @@ cursor#!#fetch#!#next
94
102
#cursor#!#fetch#!#afterlast
95
103
#cursor#!#fetch#!#next
96
104
cursor#!#close
105
+
# Cursor with multiple selects should return error
106
+
cursor#!#open#!#prepst#!#SELECT * FROM test_cursor_prep_exec_fetch_next;SELECT a FROM test_cursor_prep_exec_fetch_next#!#TYPE_SCROLL_INSENSITIVE#!#CONCUR_READ_ONLY#!#CLOSE_CURSORS_AT_COMMIT
0 commit comments