From 0efbb1570eb98efc0d6d39ad662837521672b6dc Mon Sep 17 00:00:00 2001 From: Anikait Agrawal <54908236+Anikait143@users.noreply.github.com> Date: Thu, 18 Apr 2024 20:02:59 +0530 Subject: [PATCH] Fix syntax error when delimited column alias is used without preceding whitespace (#2512) When the alias is directly adjacent to a keyword (like END) or a non-delimited column name, the error message mentions AS, even though there is no AS keyword in the query. This bug is caused by ANTLR rewriting, we have added an extra space before 'AS' keyword when rewriting the query which which doesn't explicitly has 'AS' keyword before alias. # Input SELECT CASE WHEN 1=1 THEN 1 ELSE 0 END[c] # previous output (wrong output) Msg 33557097, Level 16, State 1, Server persist-rcv-07mar-16-2-0-9, Line 1 syntax error at or near "ENDAS" # current output (correct output) ~~START~~ int 1 ~~END~~ # previous output (wrong output) SELECT 1c; Msg 33557097, Level 16, State 1, Server persist-rcv-07mar-16-2-0-9, Line 1 trailing junk after numeric literal at or near "1A" # current output (correct output) SELECT 1c; ~~START~~ int 1 ~~END~~ Added Test Cases for this issue 4_X PR: #2504 Task: BABEL-4863 Authored-by: Anikait Agrawal agraani@amazon.com Signed-off-by: Anikait Agrawal Co-authored-by: Anikait Agrawal --- contrib/babelfishpg_tsql/src/tsqlIface.cpp | 12 +- ...efore-16_3-or-15_7-or-14_12-vu-cleanup.out | 8 + ...efore-16_3-or-15_7-or-14_12-vu-prepare.out | 26 ++ ...before-16_3-or-15_7-or-14_12-vu-verify.out | 35 +++ test/JDBC/expected/BABEL-4863-vu-cleanup.out | 10 + test/JDBC/expected/BABEL-4863-vu-prepare.out | 37 +++ test/JDBC/expected/BABEL-4863-vu-verify.out | 241 ++++++++++++++++++ test/JDBC/expected/babel_varbinary.out | 8 +- .../sys-all_columns-dep-vu-prepare.out | 2 +- .../sys-all_columns-dep-vu-verify.out | 2 +- ...efore-16_3-or-15_7-or-14_12-vu-cleanup.sql | 8 + ...efore-16_3-or-15_7-or-14_12-vu-prepare.sql | 26 ++ ...before-16_3-or-15_7-or-14_12-vu-verify.sql | 10 + test/JDBC/input/BABEL-4863-vu-cleanup.sql | 10 + test/JDBC/input/BABEL-4863-vu-prepare.sql | 35 +++ test/JDBC/input/BABEL-4863-vu-verify.sql | 71 ++++++ test/JDBC/input/babel_varbinary.sql | 1 - .../views/sys-all_columns-dep-vu-prepare.sql | 2 +- .../views/sys-all_columns-dep-vu-verify.sql | 2 +- test/JDBC/jdbc_schedule | 3 + test/JDBC/upgrade/13_4/schedule | 1 + test/JDBC/upgrade/13_5/schedule | 1 + test/JDBC/upgrade/13_6/schedule | 1 + test/JDBC/upgrade/13_7/schedule | 1 + test/JDBC/upgrade/13_8/schedule | 1 + test/JDBC/upgrade/13_9/schedule | 1 + test/JDBC/upgrade/14_10/schedule | 1 + test/JDBC/upgrade/14_11/schedule | 1 + test/JDBC/upgrade/14_3/schedule | 1 + test/JDBC/upgrade/14_5/schedule | 1 + test/JDBC/upgrade/14_6/schedule | 1 + test/JDBC/upgrade/14_7/schedule | 1 + test/JDBC/upgrade/14_8/schedule | 1 + test/JDBC/upgrade/14_9/schedule | 1 + test/JDBC/upgrade/latest/schedule | 1 + 35 files changed, 548 insertions(+), 16 deletions(-) create mode 100644 test/JDBC/expected/BABEL-4863-before-16_3-or-15_7-or-14_12-vu-cleanup.out create mode 100644 test/JDBC/expected/BABEL-4863-before-16_3-or-15_7-or-14_12-vu-prepare.out create mode 100644 test/JDBC/expected/BABEL-4863-before-16_3-or-15_7-or-14_12-vu-verify.out create mode 100644 test/JDBC/expected/BABEL-4863-vu-cleanup.out create mode 100644 test/JDBC/expected/BABEL-4863-vu-prepare.out create mode 100644 test/JDBC/expected/BABEL-4863-vu-verify.out create mode 100644 test/JDBC/input/BABEL-4863-before-16_3-or-15_7-or-14_12-vu-cleanup.sql create mode 100644 test/JDBC/input/BABEL-4863-before-16_3-or-15_7-or-14_12-vu-prepare.sql create mode 100644 test/JDBC/input/BABEL-4863-before-16_3-or-15_7-or-14_12-vu-verify.sql create mode 100644 test/JDBC/input/BABEL-4863-vu-cleanup.sql create mode 100644 test/JDBC/input/BABEL-4863-vu-prepare.sql create mode 100644 test/JDBC/input/BABEL-4863-vu-verify.sql diff --git a/contrib/babelfishpg_tsql/src/tsqlIface.cpp b/contrib/babelfishpg_tsql/src/tsqlIface.cpp index 83dc8d25b3..6d209ced92 100644 --- a/contrib/babelfishpg_tsql/src/tsqlIface.cpp +++ b/contrib/babelfishpg_tsql/src/tsqlIface.cpp @@ -2316,15 +2316,13 @@ static void process_query_specification( auto column_alias_as = elem->expression_elem()->as_column_alias(); if (!column_alias_as->AS()) { - std::string orig_text = ::getFullText(column_alias_as->column_alias()); - std::string repl_text = std::string("AS "); - if (is_quotation_needed_for_column_alias(column_alias_as->column_alias())) - repl_text += std::string("\"") + orig_text + "\""; + { + mutator->add(column_alias_as->start->getStartIndex(), "", " AS \""); + mutator->add(column_alias_as->stop->getStopIndex() + 1, "", "\""); + } else - repl_text += orig_text; - - mutator->add(column_alias_as->start->getStartIndex(), "", "AS "); + mutator->add(column_alias_as->start->getStartIndex(), "", " AS "); } } } diff --git a/test/JDBC/expected/BABEL-4863-before-16_3-or-15_7-or-14_12-vu-cleanup.out b/test/JDBC/expected/BABEL-4863-before-16_3-or-15_7-or-14_12-vu-cleanup.out new file mode 100644 index 0000000000..fdc693f67d --- /dev/null +++ b/test/JDBC/expected/BABEL-4863-before-16_3-or-15_7-or-14_12-vu-cleanup.out @@ -0,0 +1,8 @@ +drop function if exists babel_4863_func +GO +drop function if exists babel_4863_func1 +GO +drop procedure if exists babel_4863_proc +GO +drop view if exists babel_4863_view +GO diff --git a/test/JDBC/expected/BABEL-4863-before-16_3-or-15_7-or-14_12-vu-prepare.out b/test/JDBC/expected/BABEL-4863-before-16_3-or-15_7-or-14_12-vu-prepare.out new file mode 100644 index 0000000000..9dd4832b09 --- /dev/null +++ b/test/JDBC/expected/BABEL-4863-before-16_3-or-15_7-or-14_12-vu-prepare.out @@ -0,0 +1,26 @@ +create function babel_4863_func() + returns table as return + ( + select '1' as val + ) +go + +create function babel_4863_func1() +returns table as return +( + SELECT CASE WHEN 1=1 THEN 1 ELSE 0 END +) +GO + +CREATE PROCEDURE babel_4863_proc @a INT +AS BEGIN +DECLARE @v1 int = CASE WHEN @a=1 THEN 1 ELSE 0 END; +DECLARE @v2 int = CASE WHEN @a=1 THEN 1 ELSE 0 END; +DECLARE @v3 int = CASE WHEN @a=1 THEN 1 ELSE 0 END; +SELECT @v1, @v2, @v3; +END; +GO + +CREATE VIEW babel_4863_view AS +SELECT CASE WHEN 1=1 THEN 1 ELSE 0 END; +GO diff --git a/test/JDBC/expected/BABEL-4863-before-16_3-or-15_7-or-14_12-vu-verify.out b/test/JDBC/expected/BABEL-4863-before-16_3-or-15_7-or-14_12-vu-verify.out new file mode 100644 index 0000000000..01b64f2888 --- /dev/null +++ b/test/JDBC/expected/BABEL-4863-before-16_3-or-15_7-or-14_12-vu-verify.out @@ -0,0 +1,35 @@ +select babel_4863_func(); +GO +~~START~~ +varchar +1 +~~END~~ + +select * from babel_4863_func1(); +GO +~~START~~ +int +1 +~~END~~ + +exec babel_4863_proc 1; +GO +~~START~~ +int#!#int#!#int +1#!#1#!#1 +~~END~~ + +exec babel_4863_proc 2; +GO +~~START~~ +int#!#int#!#int +0#!#0#!#0 +~~END~~ + +SELECT * FROM babel_4863_view; +GO +~~START~~ +int +1 +~~END~~ + diff --git a/test/JDBC/expected/BABEL-4863-vu-cleanup.out b/test/JDBC/expected/BABEL-4863-vu-cleanup.out new file mode 100644 index 0000000000..d7c0dc6b68 --- /dev/null +++ b/test/JDBC/expected/BABEL-4863-vu-cleanup.out @@ -0,0 +1,10 @@ +drop table if exists babel_4863_t1 +GO +drop function if exists babel_4863_func +GO +drop function if exists babel_4863_func1 +GO +drop procedure if exists babel_4863_proc +GO +drop view if exists babel_4863_view +GO diff --git a/test/JDBC/expected/BABEL-4863-vu-prepare.out b/test/JDBC/expected/BABEL-4863-vu-prepare.out new file mode 100644 index 0000000000..4d60a432d7 --- /dev/null +++ b/test/JDBC/expected/BABEL-4863-vu-prepare.out @@ -0,0 +1,37 @@ +create table babel_4863_t1 (a int) +GO +INSERT INTO babel_4863_t1 VALUES(1) +GO +~~ROW COUNT: 1~~ + + +create function babel_4863_func() + returns table as return + ( + select 'value' = '1' + ) +go + +create function babel_4863_func1() +returns table as return +( + SELECT CASE WHEN 1=1 THEN 1 ELSE 0 END[this is a $.^ test], + CASE WHEN 1=1 THEN 1 ELSE 0 END'this is a $.^ test1', + CASE WHEN 1=1 THEN 1 ELSE 0 END"this is a $.^ test2" +) +GO + +CREATE PROCEDURE babel_4863_proc @a INT +AS BEGIN +DECLARE @v1 int = CASE WHEN @a=1 THEN 1 ELSE 0 END; +DECLARE @v2 int = CASE WHEN @a=1 THEN 1 ELSE 0 END; +DECLARE @v3 int = CASE WHEN @a=1 THEN 1 ELSE 0 END; +SELECT @v1[this is a $.^ test], @v2'this is a $.^ test1', @v3"this is a $.^ test2"; +END; +GO + +CREATE VIEW babel_4863_view AS +SELECT CASE WHEN 1=1 THEN 1 ELSE 0 END[this is a $.^ test], + CASE WHEN 1=1 THEN 1 ELSE 0 END'this is a $.^ test1', + CASE WHEN 1=1 THEN 1 ELSE 0 END"this is a $.^ test2"; +GO diff --git a/test/JDBC/expected/BABEL-4863-vu-verify.out b/test/JDBC/expected/BABEL-4863-vu-verify.out new file mode 100644 index 0000000000..c49dd6116c --- /dev/null +++ b/test/JDBC/expected/BABEL-4863-vu-verify.out @@ -0,0 +1,241 @@ +SELECT 123abc; +GO +~~START~~ +int +123 +~~END~~ + +SELECT 0x0o; +GO +~~START~~ +varbinary +00 +~~END~~ + +SELECT 1_2_3; +GO +~~START~~ +int +1 +~~END~~ + +SELECT 0.a; +GO +~~START~~ +numeric +0 +~~END~~ + +SELECT 0.0a; +GO +~~START~~ +numeric +0 +~~END~~ + +SELECT .0a; +GO +~~START~~ +numeric +0 +~~END~~ + +SELECT 0.0e1a; +GO +~~START~~ +numeric +0 +~~END~~ + +SELECT $1a; +GO +~~START~~ +int +1 +~~END~~ + +SELECT CASE WHEN 1=1 THEN 1 ELSE 0 END[c] +GO +~~START~~ +int +1 +~~END~~ + +SELECT CASE WHEN 1=1 THEN 1 ELSE 0 END'c' +GO +~~START~~ +int +1 +~~END~~ + +SELECT CASE WHEN 1=1 THEN 1 ELSE 0 END"c" +GO +~~START~~ +int +1 +~~END~~ + +select a[c] from babel_4863_t1 +GO +~~START~~ +int +1 +~~END~~ + +select a"c" from babel_4863_t1 +GO +~~START~~ +int +1 +~~END~~ + +select a'c' from babel_4863_t1 +GO +~~START~~ +int +1 +~~END~~ + +declare @v int=1 +select @v[c] +GO +~~START~~ +int +1 +~~END~~ + +declare @v int=1 +select @v'c' +GO +~~START~~ +int +1 +~~END~~ + +declare @v int=1 +select @v"c" +GO +~~START~~ +int +1 +~~END~~ + +select babel_4863_func()[a]; +GO +~~START~~ +varchar +1 +~~END~~ + +select 1[c]; +GO +~~START~~ +int +1 +~~END~~ + +select 1'c'; +GO +~~START~~ +int +1 +~~END~~ + +select 1"c"; +GO +~~START~~ +int +1 +~~END~~ + +select 'abc'[def]; +GO +~~START~~ +varchar +abc +~~END~~ + +select 'abc''def'; +GO +~~START~~ +varchar +abc'def +~~END~~ + +select 'abc'"def"; +GO +~~START~~ +varchar +abc +~~END~~ + +select 123[this is a $.^ test] +GO +~~START~~ +int +123 +~~END~~ + +select 123'this is a $.^ test' +GO +~~START~~ +int +123 +~~END~~ + +select 123"this is a $.^ test" +GO +~~START~~ +int +123 +~~END~~ + +SELECT CASE WHEN 1=1 THEN 1 ELSE 0 END[this is a $.^ test] +GO +~~START~~ +int +1 +~~END~~ + +SELECT CASE WHEN 1=1 THEN 1 ELSE 0 END'this is a $.^ test' +GO +~~START~~ +int +1 +~~END~~ + +SELECT CASE WHEN 1=1 THEN 1 ELSE 0 END"this is a $.^ test" +GO +~~START~~ +int +1 +~~END~~ + +select * from babel_4863_func1(); +GO +~~START~~ +int#!#int#!#int +1#!#1#!#1 +~~END~~ + +exec babel_4863_proc 1; +GO +~~START~~ +int#!#int#!#int +1#!#1#!#1 +~~END~~ + +exec babel_4863_proc 2; +GO +~~START~~ +int#!#int#!#int +0#!#0#!#0 +~~END~~ + +SELECT * FROM babel_4863_view; +GO +~~START~~ +int#!#int#!#int +1#!#1#!#1 +~~END~~ + diff --git a/test/JDBC/expected/babel_varbinary.out b/test/JDBC/expected/babel_varbinary.out index 935538e9ff..54571c27e0 100644 --- a/test/JDBC/expected/babel_varbinary.out +++ b/test/JDBC/expected/babel_varbinary.out @@ -50,12 +50,12 @@ varbinary ~~END~~ --- invalid hex input select 0x1G2A; go -~~ERROR (Code: 33557097)~~ - -~~ERROR (Message: invalid hexadecimal digit: "S")~~ +~~START~~ +varbinary +01 +~~END~~ -- test insert of hex string diff --git a/test/JDBC/expected/sys-all_columns-dep-vu-prepare.out b/test/JDBC/expected/sys-all_columns-dep-vu-prepare.out index 1b9966af3c..690612899d 100644 --- a/test/JDBC/expected/sys-all_columns-dep-vu-prepare.out +++ b/test/JDBC/expected/sys-all_columns-dep-vu-prepare.out @@ -11,7 +11,7 @@ CREATE PROCEDURE sys_all_columns_dep_vu_prepare_proc1 AS SELECT name, is_nullable, column_id FROM sys.all_columns - WHERE name in ('sac_int_col1', 'sac_text_col_not_null1'); + WHERE name in ('sac_int_col1', 'sac_text_col_not_null1') order by column_id; GO CREATE FUNCTION sys_all_columns_dep_vu_prepare_func1() diff --git a/test/JDBC/expected/sys-all_columns-dep-vu-verify.out b/test/JDBC/expected/sys-all_columns-dep-vu-verify.out index 347a847a1c..3451daf65b 100644 --- a/test/JDBC/expected/sys-all_columns-dep-vu-verify.out +++ b/test/JDBC/expected/sys-all_columns-dep-vu-verify.out @@ -15,7 +15,7 @@ int ~~END~~ -SELECT * FROM sys_all_columns_dep_vu_prepare_view1; +SELECT * FROM sys_all_columns_dep_vu_prepare_view1 order by max_length; GO ~~START~~ varchar#!#smallint#!#tinyint diff --git a/test/JDBC/input/BABEL-4863-before-16_3-or-15_7-or-14_12-vu-cleanup.sql b/test/JDBC/input/BABEL-4863-before-16_3-or-15_7-or-14_12-vu-cleanup.sql new file mode 100644 index 0000000000..fdc693f67d --- /dev/null +++ b/test/JDBC/input/BABEL-4863-before-16_3-or-15_7-or-14_12-vu-cleanup.sql @@ -0,0 +1,8 @@ +drop function if exists babel_4863_func +GO +drop function if exists babel_4863_func1 +GO +drop procedure if exists babel_4863_proc +GO +drop view if exists babel_4863_view +GO diff --git a/test/JDBC/input/BABEL-4863-before-16_3-or-15_7-or-14_12-vu-prepare.sql b/test/JDBC/input/BABEL-4863-before-16_3-or-15_7-or-14_12-vu-prepare.sql new file mode 100644 index 0000000000..9dd4832b09 --- /dev/null +++ b/test/JDBC/input/BABEL-4863-before-16_3-or-15_7-or-14_12-vu-prepare.sql @@ -0,0 +1,26 @@ +create function babel_4863_func() + returns table as return + ( + select '1' as val + ) +go + +create function babel_4863_func1() +returns table as return +( + SELECT CASE WHEN 1=1 THEN 1 ELSE 0 END +) +GO + +CREATE PROCEDURE babel_4863_proc @a INT +AS BEGIN +DECLARE @v1 int = CASE WHEN @a=1 THEN 1 ELSE 0 END; +DECLARE @v2 int = CASE WHEN @a=1 THEN 1 ELSE 0 END; +DECLARE @v3 int = CASE WHEN @a=1 THEN 1 ELSE 0 END; +SELECT @v1, @v2, @v3; +END; +GO + +CREATE VIEW babel_4863_view AS +SELECT CASE WHEN 1=1 THEN 1 ELSE 0 END; +GO diff --git a/test/JDBC/input/BABEL-4863-before-16_3-or-15_7-or-14_12-vu-verify.sql b/test/JDBC/input/BABEL-4863-before-16_3-or-15_7-or-14_12-vu-verify.sql new file mode 100644 index 0000000000..029a2b97a6 --- /dev/null +++ b/test/JDBC/input/BABEL-4863-before-16_3-or-15_7-or-14_12-vu-verify.sql @@ -0,0 +1,10 @@ +select babel_4863_func(); +GO +select * from babel_4863_func1(); +GO +exec babel_4863_proc 1; +GO +exec babel_4863_proc 2; +GO +SELECT * FROM babel_4863_view; +GO diff --git a/test/JDBC/input/BABEL-4863-vu-cleanup.sql b/test/JDBC/input/BABEL-4863-vu-cleanup.sql new file mode 100644 index 0000000000..d7c0dc6b68 --- /dev/null +++ b/test/JDBC/input/BABEL-4863-vu-cleanup.sql @@ -0,0 +1,10 @@ +drop table if exists babel_4863_t1 +GO +drop function if exists babel_4863_func +GO +drop function if exists babel_4863_func1 +GO +drop procedure if exists babel_4863_proc +GO +drop view if exists babel_4863_view +GO diff --git a/test/JDBC/input/BABEL-4863-vu-prepare.sql b/test/JDBC/input/BABEL-4863-vu-prepare.sql new file mode 100644 index 0000000000..4a1af928cb --- /dev/null +++ b/test/JDBC/input/BABEL-4863-vu-prepare.sql @@ -0,0 +1,35 @@ +create table babel_4863_t1 (a int) +GO +INSERT INTO babel_4863_t1 VALUES(1) +GO + +create function babel_4863_func() + returns table as return + ( + select 'value' = '1' + ) +go + +create function babel_4863_func1() +returns table as return +( + SELECT CASE WHEN 1=1 THEN 1 ELSE 0 END[this is a $.^ test], + CASE WHEN 1=1 THEN 1 ELSE 0 END'this is a $.^ test1', + CASE WHEN 1=1 THEN 1 ELSE 0 END"this is a $.^ test2" +) +GO + +CREATE PROCEDURE babel_4863_proc @a INT +AS BEGIN +DECLARE @v1 int = CASE WHEN @a=1 THEN 1 ELSE 0 END; +DECLARE @v2 int = CASE WHEN @a=1 THEN 1 ELSE 0 END; +DECLARE @v3 int = CASE WHEN @a=1 THEN 1 ELSE 0 END; +SELECT @v1[this is a $.^ test], @v2'this is a $.^ test1', @v3"this is a $.^ test2"; +END; +GO + +CREATE VIEW babel_4863_view AS +SELECT CASE WHEN 1=1 THEN 1 ELSE 0 END[this is a $.^ test], + CASE WHEN 1=1 THEN 1 ELSE 0 END'this is a $.^ test1', + CASE WHEN 1=1 THEN 1 ELSE 0 END"this is a $.^ test2"; +GO diff --git a/test/JDBC/input/BABEL-4863-vu-verify.sql b/test/JDBC/input/BABEL-4863-vu-verify.sql new file mode 100644 index 0000000000..163596c1c7 --- /dev/null +++ b/test/JDBC/input/BABEL-4863-vu-verify.sql @@ -0,0 +1,71 @@ +SELECT 123abc; +GO +SELECT 0x0o; +GO +SELECT 1_2_3; +GO +SELECT 0.a; +GO +SELECT 0.0a; +GO +SELECT .0a; +GO +SELECT 0.0e1a; +GO +SELECT $1a; +GO +SELECT CASE WHEN 1=1 THEN 1 ELSE 0 END[c] +GO +SELECT CASE WHEN 1=1 THEN 1 ELSE 0 END'c' +GO +SELECT CASE WHEN 1=1 THEN 1 ELSE 0 END"c" +GO +select a[c] from babel_4863_t1 +GO +select a"c" from babel_4863_t1 +GO +select a'c' from babel_4863_t1 +GO +declare @v int=1 +select @v[c] +GO +declare @v int=1 +select @v'c' +GO +declare @v int=1 +select @v"c" +GO +select babel_4863_func()[a]; +GO +select 1[c]; +GO +select 1'c'; +GO +select 1"c"; +GO +select 'abc'[def]; +GO +select 'abc''def'; +GO +select 'abc'"def"; +GO +select 123[this is a $.^ test] +GO +select 123'this is a $.^ test' +GO +select 123"this is a $.^ test" +GO +SELECT CASE WHEN 1=1 THEN 1 ELSE 0 END[this is a $.^ test] +GO +SELECT CASE WHEN 1=1 THEN 1 ELSE 0 END'this is a $.^ test' +GO +SELECT CASE WHEN 1=1 THEN 1 ELSE 0 END"this is a $.^ test" +GO +select * from babel_4863_func1(); +GO +exec babel_4863_proc 1; +GO +exec babel_4863_proc 2; +GO +SELECT * FROM babel_4863_view; +GO diff --git a/test/JDBC/input/babel_varbinary.sql b/test/JDBC/input/babel_varbinary.sql index 1129973929..a468583355 100644 --- a/test/JDBC/input/babel_varbinary.sql +++ b/test/JDBC/input/babel_varbinary.sql @@ -16,7 +16,6 @@ go select 0x1F1; go --- invalid hex input select 0x1G2A; go diff --git a/test/JDBC/input/views/sys-all_columns-dep-vu-prepare.sql b/test/JDBC/input/views/sys-all_columns-dep-vu-prepare.sql index 1b9966af3c..690612899d 100644 --- a/test/JDBC/input/views/sys-all_columns-dep-vu-prepare.sql +++ b/test/JDBC/input/views/sys-all_columns-dep-vu-prepare.sql @@ -11,7 +11,7 @@ CREATE PROCEDURE sys_all_columns_dep_vu_prepare_proc1 AS SELECT name, is_nullable, column_id FROM sys.all_columns - WHERE name in ('sac_int_col1', 'sac_text_col_not_null1'); + WHERE name in ('sac_int_col1', 'sac_text_col_not_null1') order by column_id; GO CREATE FUNCTION sys_all_columns_dep_vu_prepare_func1() diff --git a/test/JDBC/input/views/sys-all_columns-dep-vu-verify.sql b/test/JDBC/input/views/sys-all_columns-dep-vu-verify.sql index e51520e4ef..6da500cc30 100644 --- a/test/JDBC/input/views/sys-all_columns-dep-vu-verify.sql +++ b/test/JDBC/input/views/sys-all_columns-dep-vu-verify.sql @@ -4,6 +4,6 @@ GO SELECT * FROM sys_all_columns_dep_vu_prepare_func1(); GO -SELECT * FROM sys_all_columns_dep_vu_prepare_view1; +SELECT * FROM sys_all_columns_dep_vu_prepare_view1 order by max_length; GO diff --git a/test/JDBC/jdbc_schedule b/test/JDBC/jdbc_schedule index 3b33f26dca..dcdeed8467 100644 --- a/test/JDBC/jdbc_schedule +++ b/test/JDBC/jdbc_schedule @@ -152,6 +152,9 @@ ignore#!#BABEL-4641-before-16_3-or-15_7-or-14_12-vu-cleanup ignore#!#BABEL-3147-before-16_3-or-15_7-or-14_12-vu-prepare ignore#!#BABEL-3147-before-16_3-or-15_7-or-14_12-vu-verify ignore#!#BABEL-3147-before-16_3-or-15_7-or-14_12-vu-cleanup +ignore#!#BABEL-4863-before-16_3-or-15_7-or-14_12-vu-prepare +ignore#!#BABEL-4863-before-16_3-or-15_7-or-14_12-vu-verify +ignore#!#BABEL-4863-before-16_3-or-15_7-or-14_12-vu-cleanup # These tests are running in multidb mode in upgrade and singledb mode in JDBC ignore#!#BABEL-4279-vu-prepare diff --git a/test/JDBC/upgrade/13_4/schedule b/test/JDBC/upgrade/13_4/schedule index f58ea21bc3..eb7cf384b3 100644 --- a/test/JDBC/upgrade/13_4/schedule +++ b/test/JDBC/upgrade/13_4/schedule @@ -206,3 +206,4 @@ AUTO_ANALYZE-before-15-5-or-14-10 permission_restrictions_from_pg # babel-4517 created : BABEL-4727 to track the issue BABEL-4641-before-16_3-or-15_7-or-14_12 +BABEL-4863-before-16_3-or-15_7-or-14_12 diff --git a/test/JDBC/upgrade/13_5/schedule b/test/JDBC/upgrade/13_5/schedule index 8fc5cb3d2c..22df5c83df 100644 --- a/test/JDBC/upgrade/13_5/schedule +++ b/test/JDBC/upgrade/13_5/schedule @@ -257,3 +257,4 @@ AUTO_ANALYZE-before-15-5-or-14-10 permission_restrictions_from_pg # babel-4517 created : BABEL-4727 to track the issue BABEL-4641-before-16_3-or-15_7-or-14_12 +BABEL-4863-before-16_3-or-15_7-or-14_12 diff --git a/test/JDBC/upgrade/13_6/schedule b/test/JDBC/upgrade/13_6/schedule index 70ac806f3c..9a8fa8886e 100644 --- a/test/JDBC/upgrade/13_6/schedule +++ b/test/JDBC/upgrade/13_6/schedule @@ -317,3 +317,4 @@ AUTO_ANALYZE-before-15-5-or-14-10 permission_restrictions_from_pg babel-4517 BABEL-4641-before-16_3-or-15_7-or-14_12 +BABEL-4863-before-16_3-or-15_7-or-14_12 diff --git a/test/JDBC/upgrade/13_7/schedule b/test/JDBC/upgrade/13_7/schedule index 3cd8f0f87d..7cd309126f 100644 --- a/test/JDBC/upgrade/13_7/schedule +++ b/test/JDBC/upgrade/13_7/schedule @@ -317,3 +317,4 @@ AUTO_ANALYZE-before-15-5-or-14-10 permission_restrictions_from_pg babel-4517 BABEL-4641-before-16_3-or-15_7-or-14_12 +BABEL-4863-before-16_3-or-15_7-or-14_12 diff --git a/test/JDBC/upgrade/13_8/schedule b/test/JDBC/upgrade/13_8/schedule index 3cd8f0f87d..7cd309126f 100644 --- a/test/JDBC/upgrade/13_8/schedule +++ b/test/JDBC/upgrade/13_8/schedule @@ -317,3 +317,4 @@ AUTO_ANALYZE-before-15-5-or-14-10 permission_restrictions_from_pg babel-4517 BABEL-4641-before-16_3-or-15_7-or-14_12 +BABEL-4863-before-16_3-or-15_7-or-14_12 diff --git a/test/JDBC/upgrade/13_9/schedule b/test/JDBC/upgrade/13_9/schedule index 76f85ec60a..aab93bb460 100644 --- a/test/JDBC/upgrade/13_9/schedule +++ b/test/JDBC/upgrade/13_9/schedule @@ -317,3 +317,4 @@ AUTO_ANALYZE-before-15-5-or-14-10 permission_restrictions_from_pg babel-4517 BABEL-4641-before-16_3-or-15_7-or-14_12 +BABEL-4863-before-16_3-or-15_7-or-14_12 diff --git a/test/JDBC/upgrade/14_10/schedule b/test/JDBC/upgrade/14_10/schedule index fc8ddc251d..0d1d197710 100644 --- a/test/JDBC/upgrade/14_10/schedule +++ b/test/JDBC/upgrade/14_10/schedule @@ -425,3 +425,4 @@ babel-4517 BABEL_4553 BABEL-4641-before-16_3-or-15_7-or-14_12 BABEL_4817 +BABEL-4863-before-16_3-or-15_7-or-14_12 diff --git a/test/JDBC/upgrade/14_11/schedule b/test/JDBC/upgrade/14_11/schedule index 96f4d0c279..9e3be8672e 100644 --- a/test/JDBC/upgrade/14_11/schedule +++ b/test/JDBC/upgrade/14_11/schedule @@ -423,3 +423,4 @@ BABEL-4606 babel-4517 BABEL-4641-before-16_3-or-15_7-or-14_12 BABEL_4817 +BABEL-4863-before-16_3-or-15_7-or-14_12 diff --git a/test/JDBC/upgrade/14_3/schedule b/test/JDBC/upgrade/14_3/schedule index 9ca2ac8e28..a5a65e8097 100644 --- a/test/JDBC/upgrade/14_3/schedule +++ b/test/JDBC/upgrade/14_3/schedule @@ -330,3 +330,4 @@ AUTO_ANALYZE-before-15-5-or-14-10 permission_restrictions_from_pg babel-4517 BABEL-4641-before-16_3-or-15_7-or-14_12 +BABEL-4863-before-16_3-or-15_7-or-14_12 diff --git a/test/JDBC/upgrade/14_5/schedule b/test/JDBC/upgrade/14_5/schedule index 50c24a1e3c..c0972f18ed 100644 --- a/test/JDBC/upgrade/14_5/schedule +++ b/test/JDBC/upgrade/14_5/schedule @@ -343,3 +343,4 @@ BABEL_4389 permission_restrictions_from_pg babel-4517 BABEL-4641-before-16_3-or-15_7-or-14_12 +BABEL-4863-before-16_3-or-15_7-or-14_12 diff --git a/test/JDBC/upgrade/14_6/schedule b/test/JDBC/upgrade/14_6/schedule index b5e5f80ddb..809fbc1c68 100644 --- a/test/JDBC/upgrade/14_6/schedule +++ b/test/JDBC/upgrade/14_6/schedule @@ -369,3 +369,4 @@ AUTO_ANALYZE-before-15-5-or-14-10 BABEL_4389 babel-4517 BABEL-4641-before-16_3-or-15_7-or-14_12 +BABEL-4863-before-16_3-or-15_7-or-14_12 diff --git a/test/JDBC/upgrade/14_7/schedule b/test/JDBC/upgrade/14_7/schedule index fba56457ad..bf50fe0a78 100644 --- a/test/JDBC/upgrade/14_7/schedule +++ b/test/JDBC/upgrade/14_7/schedule @@ -411,3 +411,4 @@ AUTO_ANALYZE-before-15-5-or-14-10 BABEL_4389 babel-4517 BABEL-4641-before-16_3-or-15_7-or-14_12 +BABEL-4863-before-16_3-or-15_7-or-14_12 diff --git a/test/JDBC/upgrade/14_8/schedule b/test/JDBC/upgrade/14_8/schedule index 10e26ba624..c93328baa5 100644 --- a/test/JDBC/upgrade/14_8/schedule +++ b/test/JDBC/upgrade/14_8/schedule @@ -413,3 +413,4 @@ BABEL-4606 babel-4517 BABEL-4641-before-16_3-or-15_7-or-14_12 BABEL_4817 +BABEL-4863-before-16_3-or-15_7-or-14_12 diff --git a/test/JDBC/upgrade/14_9/schedule b/test/JDBC/upgrade/14_9/schedule index 3b867bdaee..adc2818127 100644 --- a/test/JDBC/upgrade/14_9/schedule +++ b/test/JDBC/upgrade/14_9/schedule @@ -417,3 +417,4 @@ BABEL-4606 babel-4517 BABEL-4641-before-16_3-or-15_7-or-14_12 BABEL_4817 +BABEL-4863-before-16_3-or-15_7-or-14_12 diff --git a/test/JDBC/upgrade/latest/schedule b/test/JDBC/upgrade/latest/schedule index ac85d0947b..784e0a77ac 100644 --- a/test/JDBC/upgrade/latest/schedule +++ b/test/JDBC/upgrade/latest/schedule @@ -427,3 +427,4 @@ babel-4517 BABEL-4641 BABEL-4707 BABEL_4817 +BABEL-4863