From 2dfb6f5f672cf969e36eccf90bc6ed5ed42a20d2 Mon Sep 17 00:00:00 2001 From: Tanzeel Khan <140405735+tanscorpio7@users.noreply.github.com> Date: Thu, 21 Dec 2023 10:49:46 +0530 Subject: [PATCH] Fix typmod for sys.binary datatype (#2037) sys.binary datatype is created as a domain over sys.bbf_binary. In babelfish we assume hex code as varbinary which must then be casted to binary. For casting we fetch rule from hashmap after coercing both source and target to base type. So binary --> bbf_binary && varbinary-->bbf_varbinary This cast is currently defined as binary coercible, that is NO modification needed. https://github.com/babelfish-for-postgresql/babelfish_extensions/blob/c57e8bc7820e1ef697dd9898b3aa433ba504a7ab/contrib/babelfishpg_tsql/src/pltsql_coerce.c#L114 We fix it by adding proper function for varbinary --> binary cast -> The default length for local variables defined for binary and varbinary should be 1 DECLARE @a binary should be equivalent to DECLARE @a binary(1) DECLARE @a varbinary should be equivalent to DECLARE @a varbinary(1) ->Problems during dump and restore done during upgrade. The new function created for the cast may not exists in the source version and the ugrade scripts are run only after pg dump and restore carried out during version upgrade. So ultimately during dump and restore no cast exists for varbinary to binary, which is a necessary requirement or upgrade will fail with error : _"pg_restore: error: could not execute query: ERROR: argument of DEFAULT must be type sys."binary", not type sys.varbinary"_. if we are dumping a procedure with sys.binary arg and a default value -> binary to varbinary we do not need to modify binary to varbinary cast since we have a type modifer defined for base type of sys.varbinary i.e. CAST(sys.bbf_varbiniary as sys.bbf_varbiniary). Task: BABEL-4544 Signed-off-by: Tanzeel Khan --- contrib/babelfishpg_common/sql/binary.sql | 5 + .../babelfish_common_helper--3.3.0--3.4.0.sql | 4 + .../babelfishpg_common--2.6.0--3.0.0.sql | 16 + contrib/babelfishpg_tsql/src/pltsql_coerce.c | 25 +- contrib/babelfishpg_tsql/src/pltsql_utils.c | 8 + contrib/babelfishpg_tsql/src/tsqlIface.cpp | 15 +- test/JDBC/expected/BABEL-1566-vu-verify.out | 2 +- test/JDBC/expected/BABEL-1566.out | 2 +- ...L-3166-before-14_11-or-15_6-vu-prepare.out | 43 +++ ...EL-3166-before-14_11-or-15_6-vu-verify.out | 38 +++ test/JDBC/expected/BABEL-3166-vu-prepare.out | 2 +- test/JDBC/expected/BABEL-3166-vu-verify.out | 2 +- test/JDBC/expected/BABEL_1940.out | 2 +- test/JDBC/expected/BABEL_4544.out | 280 ++++++++++++++++++ test/JDBC/expected/TestBinary-vu-prepare.out | 2 +- test/JDBC/expected/TestBinary.out | 2 +- test/JDBC/expected/babel_datatype.out | 6 +- test/JDBC/expected/binary-index-vu-verify.out | 12 +- test/JDBC/expected/openquery-vu-verify.out | 2 +- ...L-3166-before-14_11-or-15_6-vu-prepare.sql | 23 ++ ...EL-3166-before-14_11-or-15_6-vu-verify.sql | 18 ++ test/JDBC/input/BABEL_4544.sql | 94 ++++++ .../input/datatypes/TestBinary-vu-prepare.txt | 2 +- test/JDBC/input/datatypes/TestBinary.txt | 2 +- test/JDBC/jdbc_schedule | 2 + test/JDBC/upgrade/13_4/schedule | 2 +- test/JDBC/upgrade/13_5/schedule | 2 +- test/JDBC/upgrade/13_6/schedule | 2 +- test/JDBC/upgrade/13_7/schedule | 2 +- test/JDBC/upgrade/13_8/schedule | 2 +- test/JDBC/upgrade/13_9/schedule | 2 +- test/JDBC/upgrade/14_10/schedule | 2 +- test/JDBC/upgrade/14_3/schedule | 2 +- test/JDBC/upgrade/14_5/schedule | 2 +- test/JDBC/upgrade/14_6/schedule | 2 +- test/JDBC/upgrade/14_7/schedule | 2 +- test/JDBC/upgrade/14_8/schedule | 2 +- test/JDBC/upgrade/14_9/schedule | 2 +- test/JDBC/upgrade/15_1/schedule | 2 +- test/JDBC/upgrade/15_2/schedule | 2 +- test/JDBC/upgrade/15_3/schedule | 2 +- test/JDBC/upgrade/15_4/schedule | 2 +- test/JDBC/upgrade/15_5/schedule | 2 +- .../expected_drop.out | 1 + 44 files changed, 603 insertions(+), 43 deletions(-) create mode 100644 contrib/babelfishpg_common/sql/upgrades/babelfishpg_common--2.6.0--3.0.0.sql create mode 100644 test/JDBC/expected/BABEL-3166-before-14_11-or-15_6-vu-prepare.out create mode 100644 test/JDBC/expected/BABEL-3166-before-14_11-or-15_6-vu-verify.out create mode 100644 test/JDBC/expected/BABEL_4544.out create mode 100644 test/JDBC/input/BABEL-3166-before-14_11-or-15_6-vu-prepare.sql create mode 100644 test/JDBC/input/BABEL-3166-before-14_11-or-15_6-vu-verify.sql create mode 100644 test/JDBC/input/BABEL_4544.sql diff --git a/contrib/babelfishpg_common/sql/binary.sql b/contrib/babelfishpg_common/sql/binary.sql index 98e0b425e42..0ddd5cbc4b7 100644 --- a/contrib/babelfishpg_common/sql/binary.sql +++ b/contrib/babelfishpg_common/sql/binary.sql @@ -46,6 +46,11 @@ CREATE TYPE sys.BBF_BINARY ( COLLATABLE = false ); +CREATE OR REPLACE FUNCTION sys.varbinarybinary (sys.BBF_VARBINARY, integer, boolean) +RETURNS sys.BBF_BINARY +AS 'babelfishpg_common', 'binary' +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; + CREATE CAST (sys.BBF_BINARY AS sys.BBF_VARBINARY) WITHOUT FUNCTION AS IMPLICIT; diff --git a/contrib/babelfishpg_common/sql/upgrades/babelfish_common_helper--3.3.0--3.4.0.sql b/contrib/babelfishpg_common/sql/upgrades/babelfish_common_helper--3.3.0--3.4.0.sql index 08b39c926fb..2fdbe9e915c 100644 --- a/contrib/babelfishpg_common/sql/upgrades/babelfish_common_helper--3.3.0--3.4.0.sql +++ b/contrib/babelfishpg_common/sql/upgrades/babelfish_common_helper--3.3.0--3.4.0.sql @@ -7,6 +7,10 @@ SELECT set_config('search_path', 'sys, '||current_setting('search_path'), false); +CREATE OR REPLACE FUNCTION sys.varbinarybinary (sys.BBF_VARBINARY, integer, boolean) +RETURNS sys.BBF_BINARY +AS 'babelfishpg_common', 'binary' +LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; -- Reset search_path to not affect any subsequent scripts SELECT set_config('search_path', trim(leading 'sys, ' from current_setting('search_path')), false); diff --git a/contrib/babelfishpg_common/sql/upgrades/babelfishpg_common--2.6.0--3.0.0.sql b/contrib/babelfishpg_common/sql/upgrades/babelfishpg_common--2.6.0--3.0.0.sql new file mode 100644 index 00000000000..cf9363ee764 --- /dev/null +++ b/contrib/babelfishpg_common/sql/upgrades/babelfishpg_common--2.6.0--3.0.0.sql @@ -0,0 +1,16 @@ +-- complain if script is sourced in psql, rather than via ALTER EXTENSION +\echo Use "ALTER EXTENSION ""babelfishpg_common"" UPDATE TO '3.0.0'" to load this file. \quit + +SELECT set_config('search_path', 'sys, '||current_setting('search_path'), false); + +/* This helper function would only be useful and strictly be used during 1.x->2.3 and 2.3->3.0 upgrade. */ +CREATE OR REPLACE FUNCTION sys.babelfish_update_server_collation_name() RETURNS VOID +LANGUAGE C +AS 'babelfishpg_common', 'babelfish_update_server_collation_name'; + +SELECT sys.babelfish_update_server_collation_name(); + +DROP FUNCTION sys.babelfish_update_server_collation_name(); + +-- Reset search_path to not affect any subsequent scripts +SELECT set_config('search_path', trim(leading 'sys, ' from current_setting('search_path')), false); diff --git a/contrib/babelfishpg_tsql/src/pltsql_coerce.c b/contrib/babelfishpg_tsql/src/pltsql_coerce.c index d91a0c5bd7f..e9b800cbf0f 100644 --- a/contrib/babelfishpg_tsql/src/pltsql_coerce.c +++ b/contrib/babelfishpg_tsql/src/pltsql_coerce.c @@ -48,6 +48,8 @@ extern coerce_string_literal_hook_type coerce_string_literal_hook; extern select_common_type_hook_type select_common_type_hook; extern select_common_typmod_hook_type select_common_typmod_hook; +extern bool babelfish_dump_restore; + PG_FUNCTION_INFO_V1(init_tsql_coerce_hash_tab); PG_FUNCTION_INFO_V1(init_tsql_datatype_precedence_hash_tab); @@ -112,7 +114,7 @@ tsql_cast_raw_info_t tsql_cast_raw_infos[] = {PG_CAST_ENTRY, "sys", "bbf_varbinary", "pg_catalog", "int4", NULL, 'i', 'f'}, {PG_CAST_ENTRY, "sys", "bbf_varbinary", "pg_catalog", "int2", NULL, 'i', 'f'}, {TSQL_CAST_ENTRY, "sys", "bbf_varbinary", "sys", "rowversion", "varbinaryrowversion", 'i', 'f'}, - {TSQL_CAST_WITHOUT_FUNC_ENTRY, "sys", "bbf_varbinary", "sys", "bbf_binary", NULL, 'i', 'b'}, + {TSQL_CAST_ENTRY, "sys", "bbf_varbinary", "sys", "bbf_binary", "varbinarybinary", 'i', 'f'}, /* binary {only allow to cast to integral data type) */ {PG_CAST_ENTRY, "sys", "bbf_binary", "pg_catalog", "int8", NULL, 'i', 'f'}, {PG_CAST_ENTRY, "sys", "bbf_binary", "pg_catalog", "int4", NULL, 'i', 'f'}, @@ -639,9 +641,26 @@ init_tsql_coerce_hash_tab(PG_FUNCTION_ARGS) if (!OidIsValid(entry->castfunc)) { + /* + * varbinary to binary implicit type cast without function should be allowed during MVU + * since the cast function might not exists when source version is before 14_11 and 15_6 + */ + if (babelfish_dump_restore && ((*common_utility_plugin_ptr->is_tsql_varbinary_datatype) (castsource) + && (*common_utility_plugin_ptr->is_tsql_binary_datatype) (casttarget))) + { + entry->castfunc = 0; + entry->castcontext = COERCION_CODE_IMPLICIT; + entry->castmethod = COERCION_METHOD_BINARY; + value = hash_search(ht_tsql_cast_info, key, HASH_ENTER, NULL); + *(tsql_cast_info_entry_t *) value = *entry; + continue; + } /* function is not loaded. wait for next scan */ - inited_ht_tsql_cast_info = false; - continue; + else + { + inited_ht_tsql_cast_info = false; + continue; + } } } break; diff --git a/contrib/babelfishpg_tsql/src/pltsql_utils.c b/contrib/babelfishpg_tsql/src/pltsql_utils.c index 8d83b3a2493..f3b9493c1f7 100644 --- a/contrib/babelfishpg_tsql/src/pltsql_utils.c +++ b/contrib/babelfishpg_tsql/src/pltsql_utils.c @@ -38,6 +38,8 @@ bool is_tsql_any_char_datatype(Oid oid); /* sys.char / sys.nchar / * sys.varchar / sys.nvarchar */ bool is_tsql_text_ntext_or_image_datatype(Oid oid); +bool is_tsql_binary_or_varbinary_datatype(Oid oid); + bool pltsql_createFunction(ParseState *pstate, PlannedStmt *pstmt, const char *queryString, ProcessUtilityContext context, ParamListInfo params); @@ -1082,6 +1084,12 @@ is_tsql_text_ntext_or_image_datatype(Oid oid) (*common_utility_plugin_ptr->is_tsql_image_datatype) (oid); } +bool is_tsql_binary_or_varbinary_datatype(Oid oid) +{ + return (*common_utility_plugin_ptr->is_tsql_sys_binary_datatype) (oid) || + (*common_utility_plugin_ptr->is_tsql_sys_varbinary_datatype) (oid); +} + /* * Try to acquire a lock with no wait */ diff --git a/contrib/babelfishpg_tsql/src/tsqlIface.cpp b/contrib/babelfishpg_tsql/src/tsqlIface.cpp index 0625bab88a1..dcb3b1ec7ad 100644 --- a/contrib/babelfishpg_tsql/src/tsqlIface.cpp +++ b/contrib/babelfishpg_tsql/src/tsqlIface.cpp @@ -66,6 +66,7 @@ extern "C" extern PLtsql_type *parse_datatype(const char *string, int location); extern bool is_tsql_any_char_datatype(Oid oid); extern bool is_tsql_text_ntext_or_image_datatype(Oid oid); + extern bool is_tsql_binary_or_varbinary_datatype(Oid oid); extern int CurrentLineNumber; @@ -4582,9 +4583,12 @@ makeDeclareStmt(TSqlParser::Declare_statementContext *ctx, std::mapatttypmod == -1 && is_tsql_any_char_datatype(type->typoid)) + + /* (N)(VAR)CHAR and BINARY datatype length is treated as 1 when nothing is provided */ + if (type->atttypmod == -1 && (is_tsql_any_char_datatype(type->typoid) + || is_tsql_binary_or_varbinary_datatype(type->typoid))) { - std::string newTypeStr = typeStr + "(1)"; /* in T-SQL, length-less (N)(VAR)CHAR's length is treated as 1 */ + std::string newTypeStr = typeStr + "(1)"; type = parse_datatype(newTypeStr.c_str(), 0); } @@ -4613,9 +4617,12 @@ makeDeclareStmt(TSqlParser::Declare_statementContext *ctx, std::mapdata_type()); PLtsql_type *type = parse_datatype(typeStr.c_str(), 0); // FIXME: the second arg should be 'location' - if (type->atttypmod == -1 && is_tsql_any_char_datatype(type->typoid)) + + /* (N)(VAR)CHAR and BINARY datatype length is treated as 1 when nothing is provided */ + if (type->atttypmod == -1 && (is_tsql_any_char_datatype(type->typoid) + || is_tsql_binary_or_varbinary_datatype(type->typoid))) { - std::string newTypeStr = typeStr + "(1)"; /* in T-SQL, length-less (N)(VAR)CHAR's length is treated as 1 */ + std::string newTypeStr = typeStr + "(1)"; type = parse_datatype(newTypeStr.c_str(), 0); } else if (is_tsql_text_ntext_or_image_datatype(type->typoid)) diff --git a/test/JDBC/expected/BABEL-1566-vu-verify.out b/test/JDBC/expected/BABEL-1566-vu-verify.out index 035f9f727d0..311cb535943 100644 --- a/test/JDBC/expected/BABEL-1566-vu-verify.out +++ b/test/JDBC/expected/BABEL-1566-vu-verify.out @@ -281,7 +281,7 @@ select cast(cast(0xfe as binary) as text); go ~~START~~ text -0xfe +0xfe0000000000000000000000000000000000000000000000000000000000 ~~END~~ diff --git a/test/JDBC/expected/BABEL-1566.out b/test/JDBC/expected/BABEL-1566.out index c61c0da56fe..2a08c990652 100644 --- a/test/JDBC/expected/BABEL-1566.out +++ b/test/JDBC/expected/BABEL-1566.out @@ -344,7 +344,7 @@ select cast(cast(0xfe as binary) as text); go ~~START~~ text -0xfe +0xfe0000000000000000000000000000000000000000000000000000000000 ~~END~~ diff --git a/test/JDBC/expected/BABEL-3166-before-14_11-or-15_6-vu-prepare.out b/test/JDBC/expected/BABEL-3166-before-14_11-or-15_6-vu-prepare.out new file mode 100644 index 00000000000..90e274de21c --- /dev/null +++ b/test/JDBC/expected/BABEL-3166-before-14_11-or-15_6-vu-prepare.out @@ -0,0 +1,43 @@ +-- function +CREATE FUNCTION babel_3166_func(@a numeric, @b varchar, @c varchar(max), @d varchar(8), @e binary(6)) +RETURNS varbinary(8) AS BEGIN RETURN @e END; +go + +-- Look at the probin for typmod information +SELECT proname, probin FROM pg_proc WHERE proname = 'babel_3166_func'; +go +~~START~~ +varchar#!#text +babel_3166_func#!#{"version_num": "1", "typmod_array": ["1179652", "-1", "-8000", "8", "6", "8"], "original_probin": ""} +~~END~~ + + +SELECT babel_3166_func(1.2, 'abc', 'abcd', 'abcdefgh', 0x12bcfe); +go +~~START~~ +varbinary +12BCFE +~~END~~ + + +-- procedure +CREATE PROCEDURE babel_3166_proc @a numeric, @b varchar, @c varchar(max), @d varchar(8), @e binary(6) +AS SELECT @e; +go + +-- Look at the probin for typmod information +SELECT proname, probin FROM pg_proc WHERE proname = 'babel_3166_proc'; +go +~~START~~ +varchar#!#text +babel_3166_proc#!#{"version_num": "1", "typmod_array": ["1179652", "-1", "-8000", "8", "6"], "original_probin": ""} +~~END~~ + + +EXEC babel_3166_proc 1.2, 'abc', 'abcd', 'abcdefgh', 0x12bcfe; +go +~~START~~ +binary +12BCFE000000 +~~END~~ + diff --git a/test/JDBC/expected/BABEL-3166-before-14_11-or-15_6-vu-verify.out b/test/JDBC/expected/BABEL-3166-before-14_11-or-15_6-vu-verify.out new file mode 100644 index 00000000000..caea907f241 --- /dev/null +++ b/test/JDBC/expected/BABEL-3166-before-14_11-or-15_6-vu-verify.out @@ -0,0 +1,38 @@ +-- Look at function's probin for typmod information +SELECT proname, probin FROM pg_proc WHERE proname = 'babel_3166_func'; +go +~~START~~ +varchar#!#text +babel_3166_func#!#{"version_num": "1", "typmod_array": ["1179652", "-1", "-8000", "8", "6", "8"], "original_probin": ""} +~~END~~ + + +SELECT babel_3166_func(1.2, 'abc', 'abcd', 'abcdefgh', 0x12bcfe); +go +~~START~~ +varbinary +12BCFE000000 +~~END~~ + + + +DROP FUNCTION babel_3166_func; +-- Look at procedures's probin for typmod information +SELECT proname, probin FROM pg_proc WHERE proname = 'babel_3166_proc'; +go +~~START~~ +varchar#!#text +babel_3166_proc#!#{"version_num": "1", "typmod_array": ["1179652", "-1", "-8000", "8", "6"], "original_probin": ""} +~~END~~ + + +EXEC babel_3166_proc 1.2, 'abc', 'abcd', 'abcdefgh', 0x12bcfe; +go +~~START~~ +binary +12BCFE000000 +~~END~~ + + +DROP PROCEDURE babel_3166_proc; +go diff --git a/test/JDBC/expected/BABEL-3166-vu-prepare.out b/test/JDBC/expected/BABEL-3166-vu-prepare.out index 90e274de21c..482bcce97e4 100644 --- a/test/JDBC/expected/BABEL-3166-vu-prepare.out +++ b/test/JDBC/expected/BABEL-3166-vu-prepare.out @@ -16,7 +16,7 @@ SELECT babel_3166_func(1.2, 'abc', 'abcd', 'abcdefgh', 0x12bcfe); go ~~START~~ varbinary -12BCFE +12BCFE000000 ~~END~~ diff --git a/test/JDBC/expected/BABEL-3166-vu-verify.out b/test/JDBC/expected/BABEL-3166-vu-verify.out index 9a44eeb9245..caea907f241 100644 --- a/test/JDBC/expected/BABEL-3166-vu-verify.out +++ b/test/JDBC/expected/BABEL-3166-vu-verify.out @@ -11,7 +11,7 @@ SELECT babel_3166_func(1.2, 'abc', 'abcd', 'abcdefgh', 0x12bcfe); go ~~START~~ varbinary -12BCFE +12BCFE000000 ~~END~~ diff --git a/test/JDBC/expected/BABEL_1940.out b/test/JDBC/expected/BABEL_1940.out index 799aa22457a..cae4ddbfb9e 100644 --- a/test/JDBC/expected/BABEL_1940.out +++ b/test/JDBC/expected/BABEL_1940.out @@ -276,7 +276,7 @@ SELECT CAST(CAST(0x61 AS BINARY(3)) AS VARBINARY(2)) GO ~~START~~ varbinary -61 +6100 ~~END~~ diff --git a/test/JDBC/expected/BABEL_4544.out b/test/JDBC/expected/BABEL_4544.out new file mode 100644 index 00000000000..1f877593c36 --- /dev/null +++ b/test/JDBC/expected/BABEL_4544.out @@ -0,0 +1,280 @@ +SELECT DATALENGTH(CAST(0X61626364 AS BINARY(3))) +GO +~~START~~ +int +3 +~~END~~ + +SELECT DATALENGTH(CAST(0X6162 AS BINARY(3))) +GO +~~START~~ +int +3 +~~END~~ + +SELECT CAST(0x6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161 AS BINARY) +GO +~~START~~ +binary +616161616161616161616161616161616161616161616161616161616161 +~~END~~ + +SELECT CAST(0x6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161 AS BINARY(51)) +GO +~~START~~ +binary +616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616100 +~~END~~ + +SELECT DATALENGTH(CAST(CAST(0x11 AS VARBINARY(5)) AS BINARY(5))), CAST(CAST(0x11 AS VARBINARY(5)) AS BINARY(5)) +GO +~~START~~ +int#!#binary +5#!#1100000000 +~~END~~ + +SELECT DATALENGTH(CAST(CAST(0x111213141516 AS VARBINARY(5)) AS BINARY(5))), CAST(CAST(0x111213141516 AS VARBINARY(5)) AS BINARY(5)) +GO +~~START~~ +int#!#binary +5#!#1112131415 +~~END~~ + +SELECT DATALENGTH(CAST(CAST(0x11 AS BINARY(5)) AS VARBINARY(5))), CAST(CAST(0x11 AS BINARY(5)) AS VARBINARY(5)) +GO +~~START~~ +int#!#varbinary +5#!#1100000000 +~~END~~ + +SELECT DATALENGTH(CAST(CAST(0x111213141516 AS BINARY(5)) AS VARBINARY(5))), CAST(CAST(0x111213141516 AS BINARY(5)) AS VARBINARY(5)) +GO +~~START~~ +int#!#varbinary +5#!#1112131415 +~~END~~ + + +CREATE TABLE babel_4544_t (id BINARY(5)) +GO + +INSERT INTO babel_4544_t VALUES (0x65), (0x656667) +GO +~~ROW COUNT: 2~~ + +INSERT INTO babel_4544_t VALUES (0x6566676869707172) +GO +~~ERROR (Code: 33557097)~~ + +~~ERROR (Message: String or binary data would be truncated. +The statement has been terminated.)~~ + +INSERT INTO babel_4544_t VALUES (CAST(0x6566676869707172 AS VARBINARY(6))) +GO +~~ERROR (Code: 33557097)~~ + +~~ERROR (Message: String or binary data would be truncated. +The statement has been terminated.)~~ + +INSERT INTO babel_4544_t VALUES ('aa') +GO +~~ERROR (Code: 33557097)~~ + +~~ERROR (Message: cannot coerce string literal to binary datatype)~~ + +INSERT INTO babel_4544_t VALUES (CAST('aaaaaa' AS VARBINARY)) +GO +~~ERROR (Code: 33557097)~~ + +~~ERROR (Message: String or binary data would be truncated. +The statement has been terminated.)~~ + +INSERT INTO babel_4544_t VALUES (CAST('aaa' AS VARBINARY)) +GO +~~ROW COUNT: 1~~ + +INSERT INTO babel_4544_t VALUES (CAST(0x65 AS VARBINARY)), (CAST(0x6564 AS VARBINARY(5))), (CAST(0x6566676869707172 AS VARBINARY(4))), (CAST(0x65666768 AS VARBINARY(6))) +GO +~~ROW COUNT: 4~~ + + +SELECT *, DATALENGTH(id) FROM babel_4544_t +GO +~~START~~ +binary#!#int +6500000000#!#5 +6566670000#!#5 +6161610000#!#5 +6500000000#!#5 +6564000000#!#5 +6566676800#!#5 +6566676800#!#5 +~~END~~ + + +DROP TABLE babel_4544_t +GO + +-- default length should be 1 +DECLARE @A VARBINARY = 0x0123456789012345678901234567890123456789 +SELECT @A, DATALENGTH(@A) +SELECT DATALENGTH(CAST(@A as BINARY(50))), CAST(@A as BINARY(50)), CAST(@A as VARBINARY(60)) +GO +~~START~~ +varbinary#!#int +01#!#1 +~~END~~ + +~~START~~ +int#!#binary#!#varbinary +50#!#0100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000#!#01 +~~END~~ + + +DECLARE @A BINARY = 0x0123456789012345678901234567890123456789 +SELECT @A, DATALENGTH(@A) +SELECT DATALENGTH(CAST(@A as BINARY(50))), CAST(@A as BINARY(50)) +GO +~~START~~ +binary#!#int +01#!#1 +~~END~~ + +~~START~~ +int#!#binary +50#!#0100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +~~END~~ + + +DECLARE @A BINARY = 0x012345678901234567890123456789012345678901234567890123456789 +SELECT DATALENGTH(@A), @A +SELECT DATALENGTH(CAST(@A as BINARY(50))), CAST(@A as BINARY(50)) +GO +~~START~~ +int#!#binary +1#!#01 +~~END~~ + +~~START~~ +int#!#binary +50#!#0100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +~~END~~ + + +DECLARE @A BINARY = 0x01234567890123456789012345678901234567890123456789012345678901234567890123456789 +SELECT DATALENGTH(@A), @A +SELECT DATALENGTH(CAST(@A as BINARY(50))), CAST(@A as BINARY(50)) +GO +~~START~~ +int#!#binary +1#!#01 +~~END~~ + +~~START~~ +int#!#binary +50#!#0100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +~~END~~ + + +DECLARE @A BINARY(10) = 0x012345678901234567890123456789 +SELECT DATALENGTH(@A), @A +SELECT DATALENGTH(CAST(@A as BINARY(50))), CAST(@A as BINARY(50)) +GO +~~START~~ +int#!#binary +10#!#01234567890123456789 +~~END~~ + +~~START~~ +int#!#binary +50#!#0123456789012345678900000000000000000000000000000000000000000000000000000000000000000000000000000000 +~~END~~ + + +DECLARE @A BINARY(10) = 0x01234567890123456789 +SELECT DATALENGTH(@A), @A +SELECT DATALENGTH(CAST(@A as BINARY(50))), CAST(@A as BINARY(50)) +GO +~~START~~ +int#!#binary +10#!#01234567890123456789 +~~END~~ + +~~START~~ +int#!#binary +50#!#0123456789012345678900000000000000000000000000000000000000000000000000000000000000000000000000000000 +~~END~~ + + +DECLARE @A BINARY(10) = 0x0123456789012345678901234567890123456789 +SELECT DATALENGTH(@A), @A +SELECT DATALENGTH(CAST(@A as BINARY(50))), CAST(@A as BINARY(50)) +GO +~~START~~ +int#!#binary +10#!#01234567890123456789 +~~END~~ + +~~START~~ +int#!#binary +50#!#0123456789012345678900000000000000000000000000000000000000000000000000000000000000000000000000000000 +~~END~~ + + +SELECT DATALENGTH(CAST(CAST(0x11 AS VARBINARY(MAX)) AS BINARY(5))), CAST(CAST(0x11 AS VARBINARY(MAX)) AS BINARY(5)) +GO +~~START~~ +int#!#binary +5#!#1100000000 +~~END~~ + +SELECT DATALENGTH(CAST(CAST(0x111213141516 AS VARBINARY(MAX)) AS BINARY(5))), CAST(CAST(0x111213141516 AS VARBINARY(MAX)) AS BINARY(5)) +GO +~~START~~ +int#!#binary +5#!#1112131415 +~~END~~ + +SELECT DATALENGTH(CAST(CAST(0x11 AS BINARY(5)) AS VARBINARY(MAX))), CAST(CAST(0x11 AS BINARY(5)) AS VARBINARY(MAX)) +GO +~~START~~ +int#!#varbinary +5#!#1100000000 +~~END~~ + +SELECT DATALENGTH(CAST(CAST(0x111213141516 AS BINARY(5)) AS VARBINARY(MAX))), CAST(CAST(0x111213141516 AS BINARY(5)) AS VARBINARY(MAX)) +GO +~~START~~ +int#!#varbinary +5#!#1112131415 +~~END~~ + + +SELECT DATALENGTH(CAST(CAST(NULL AS VARBINARY(MAX)) AS BINARY(5))), CAST(CAST(NULL AS VARBINARY(MAX)) AS BINARY(5)) +GO +~~START~~ +int#!#binary +#!# +~~END~~ + +SELECT DATALENGTH(CAST(CAST(NULL AS VARBINARY(MAX)) AS BINARY(5))), CAST(CAST(NULL AS VARBINARY(MAX)) AS BINARY(5)) +GO +~~START~~ +int#!#binary +#!# +~~END~~ + +SELECT DATALENGTH(CAST(CAST(NULL AS BINARY(5)) AS VARBINARY(MAX))), CAST(CAST(NULL AS BINARY(5)) AS VARBINARY(MAX)) +GO +~~START~~ +int#!#varbinary +#!# +~~END~~ + +SELECT DATALENGTH(CAST(CAST(NULL AS BINARY(5)) AS VARBINARY(MAX))), CAST(CAST(NULL AS BINARY(5)) AS VARBINARY(MAX)) +GO +~~START~~ +int#!#varbinary +#!# +~~END~~ + diff --git a/test/JDBC/expected/TestBinary-vu-prepare.out b/test/JDBC/expected/TestBinary-vu-prepare.out index 35de0cfd739..031ec161548 100644 --- a/test/JDBC/expected/TestBinary-vu-prepare.out +++ b/test/JDBC/expected/TestBinary-vu-prepare.out @@ -25,7 +25,7 @@ INSERT INTO testBINARY_dt4(a, b) values (1234, 12345); prepst#!# INSERT INTO testBINARY_dt4(a, b) values(?, ?) #!#binary|-|a|-|1234#!#varbinary|-|b|-|12345 ~~ROW COUNT: 1~~ -prepst#!#exec#!#binary|-|a|-|123456789#!#varbinary|-|b|-|12345 +prepst#!#exec#!#binary|-|a|-|12345678#!#varbinary|-|b|-|12345 ~~ROW COUNT: 1~~ prepst#!#exec#!#binary|-|a|-|1234#!#varbinary|-|b|-|123456789 diff --git a/test/JDBC/expected/TestBinary.out b/test/JDBC/expected/TestBinary.out index 85a5ac131fc..562c8b0ceac 100644 --- a/test/JDBC/expected/TestBinary.out +++ b/test/JDBC/expected/TestBinary.out @@ -49,7 +49,7 @@ INSERT INTO BINARY_dt(a, b) values (1234, 12345); prepst#!# INSERT INTO BINARY_dt(a, b) values(?, ?) #!#binary|-|a|-|1234#!#varbinary|-|b|-|12345 ~~ROW COUNT: 1~~ -prepst#!#exec#!#binary|-|a|-|123456789#!#varbinary|-|b|-|12345 +prepst#!#exec#!#binary|-|a|-|12345678#!#varbinary|-|b|-|12345 ~~ROW COUNT: 1~~ prepst#!#exec#!#binary|-|a|-|1234#!#varbinary|-|b|-|123456789 diff --git a/test/JDBC/expected/babel_datatype.out b/test/JDBC/expected/babel_datatype.out index cce059dcace..d571a2b4c44 100644 --- a/test/JDBC/expected/babel_datatype.out +++ b/test/JDBC/expected/babel_datatype.out @@ -2279,14 +2279,16 @@ GO insert into testing6 values (cast('ab' as varbinary)); GO -~~ROW COUNT: 1~~ +~~ERROR (Code: 33557097)~~ + +~~ERROR (Message: String or binary data would be truncated. +The statement has been terminated.)~~ select * from testing6; GO ~~START~~ binary 61 -61 ~~END~~ diff --git a/test/JDBC/expected/binary-index-vu-verify.out b/test/JDBC/expected/binary-index-vu-verify.out index a25e9eb03db..c3480843b2f 100644 --- a/test/JDBC/expected/binary-index-vu-verify.out +++ b/test/JDBC/expected/binary-index-vu-verify.out @@ -62,7 +62,7 @@ Query Text: EXEC babel_3939_vu_prepare_p1 Index Cond: ((a)::bbf_binary = '0xbaadf00d'::bbf_varbinary) Query Text: select * from tab_binary where a = cast (0xBAADF00D as binary ) -> Index Scan using ix_tab_binary_atab_binary30474ea5eaee4ec0e0a5a86377abb1ac on tab_binary - Index Cond: ((a)::bbf_binary = '0xbaadf00d'::bbf_binary) + Index Cond: ((a)::bbf_binary = '0xbaadf00d0000000000000000000000000000000000000000000000000000'::bbf_binary) Query Text: select * from tab_binary where a = 0xBAADF00D -> Index Scan using ix_tab_binary_atab_binary30474ea5eaee4ec0e0a5a86377abb1ac on tab_binary Index Cond: ((a)::bbf_binary = '0xbaadf00d'::bbf_varbinary) @@ -95,19 +95,19 @@ Query Text: EXEC babel_3939_vu_prepare_p2 Index Cond: ((a)::bbf_varbinary = '0xbaadf00d'::bbf_varbinary) Query Text: select * from tab_varbinary where a = cast(0xBAADF00D as binary ) -> Index Scan using ix_tab_binary_btab_varbinary785ec2330c9a18520469e01cd1dc6f53 on tab_varbinary - Index Cond: ((a)::bbf_varbinary = '0xbaadf00d'::bbf_binary) + Index Cond: ((a)::bbf_varbinary = '0xbaadf00d0000000000000000000000000000000000000000000000000000'::bbf_binary) Query Text: select * from tab_varbinary where a > cast(0xBAADF00D as binary ) -> Seq Scan on tab_varbinary - Filter: ((a)::bbf_varbinary > '0xbaadf00d'::bbf_varbinary) + Filter: ((a)::bbf_varbinary > '0xbaadf00d0000000000000000000000000000000000000000000000000000'::bbf_varbinary) Query Text: select * from tab_varbinary where a < cast(0xBAADF00D as binary ) -> Seq Scan on tab_varbinary - Filter: ((a)::bbf_varbinary < '0xbaadf00d'::bbf_varbinary) + Filter: ((a)::bbf_varbinary < '0xbaadf00d0000000000000000000000000000000000000000000000000000'::bbf_varbinary) Query Text: select * from tab_varbinary where a >= cast(0xBAADF00D as binary ) -> Seq Scan on tab_varbinary - Filter: ((a)::bbf_varbinary >= '0xbaadf00d'::bbf_varbinary) + Filter: ((a)::bbf_varbinary >= '0xbaadf00d0000000000000000000000000000000000000000000000000000'::bbf_varbinary) Query Text: select * from tab_varbinary where a <= cast(0xBAADF00D as binary ) -> Seq Scan on tab_varbinary - Filter: ((a)::bbf_varbinary <= '0xbaadf00d'::bbf_varbinary) + Filter: ((a)::bbf_varbinary <= '0xbaadf00d0000000000000000000000000000000000000000000000000000'::bbf_varbinary) ~~END~~ diff --git a/test/JDBC/expected/openquery-vu-verify.out b/test/JDBC/expected/openquery-vu-verify.out index e19d98d657b..b14a6574d7a 100644 --- a/test/JDBC/expected/openquery-vu-verify.out +++ b/test/JDBC/expected/openquery-vu-verify.out @@ -2093,7 +2093,7 @@ INSERT INTO testBINARY_dt4(a, b) values (1234, 12345); prepst#!# INSERT INTO testBINARY_dt4(a, b) values(?, ?) #!#binary|-|a|-|1234#!#varbinary|-|b|-|12345 ~~ROW COUNT: 1~~ -prepst#!#exec#!#binary|-|a|-|123456789#!#varbinary|-|b|-|12345 +prepst#!#exec#!#binary|-|a|-|12345678#!#varbinary|-|b|-|12345 ~~ROW COUNT: 1~~ prepst#!#exec#!#binary|-|a|-|1234#!#varbinary|-|b|-|123456789 diff --git a/test/JDBC/input/BABEL-3166-before-14_11-or-15_6-vu-prepare.sql b/test/JDBC/input/BABEL-3166-before-14_11-or-15_6-vu-prepare.sql new file mode 100644 index 00000000000..16b17cb346e --- /dev/null +++ b/test/JDBC/input/BABEL-3166-before-14_11-or-15_6-vu-prepare.sql @@ -0,0 +1,23 @@ +-- function +CREATE FUNCTION babel_3166_func(@a numeric, @b varchar, @c varchar(max), @d varchar(8), @e binary(6)) +RETURNS varbinary(8) AS BEGIN RETURN @e END; +go + +-- Look at the probin for typmod information +SELECT proname, probin FROM pg_proc WHERE proname = 'babel_3166_func'; +go + +SELECT babel_3166_func(1.2, 'abc', 'abcd', 'abcdefgh', 0x12bcfe); +go + +-- procedure +CREATE PROCEDURE babel_3166_proc @a numeric, @b varchar, @c varchar(max), @d varchar(8), @e binary(6) +AS SELECT @e; +go + +-- Look at the probin for typmod information +SELECT proname, probin FROM pg_proc WHERE proname = 'babel_3166_proc'; +go + +EXEC babel_3166_proc 1.2, 'abc', 'abcd', 'abcdefgh', 0x12bcfe; +go \ No newline at end of file diff --git a/test/JDBC/input/BABEL-3166-before-14_11-or-15_6-vu-verify.sql b/test/JDBC/input/BABEL-3166-before-14_11-or-15_6-vu-verify.sql new file mode 100644 index 00000000000..96d1019ab94 --- /dev/null +++ b/test/JDBC/input/BABEL-3166-before-14_11-or-15_6-vu-verify.sql @@ -0,0 +1,18 @@ +-- Look at function's probin for typmod information +SELECT proname, probin FROM pg_proc WHERE proname = 'babel_3166_func'; +go + +SELECT babel_3166_func(1.2, 'abc', 'abcd', 'abcdefgh', 0x12bcfe); +go + +DROP FUNCTION babel_3166_func; + +-- Look at procedures's probin for typmod information +SELECT proname, probin FROM pg_proc WHERE proname = 'babel_3166_proc'; +go + +EXEC babel_3166_proc 1.2, 'abc', 'abcd', 'abcdefgh', 0x12bcfe; +go + +DROP PROCEDURE babel_3166_proc; +go diff --git a/test/JDBC/input/BABEL_4544.sql b/test/JDBC/input/BABEL_4544.sql new file mode 100644 index 00000000000..3c8f4783c4e --- /dev/null +++ b/test/JDBC/input/BABEL_4544.sql @@ -0,0 +1,94 @@ +SELECT DATALENGTH(CAST(0X61626364 AS BINARY(3))) +GO +SELECT DATALENGTH(CAST(0X6162 AS BINARY(3))) +GO +SELECT CAST(0x6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161 AS BINARY) +GO +SELECT CAST(0x6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161 AS BINARY(51)) +GO +SELECT DATALENGTH(CAST(CAST(0x11 AS VARBINARY(5)) AS BINARY(5))), CAST(CAST(0x11 AS VARBINARY(5)) AS BINARY(5)) +GO +SELECT DATALENGTH(CAST(CAST(0x111213141516 AS VARBINARY(5)) AS BINARY(5))), CAST(CAST(0x111213141516 AS VARBINARY(5)) AS BINARY(5)) +GO +SELECT DATALENGTH(CAST(CAST(0x11 AS BINARY(5)) AS VARBINARY(5))), CAST(CAST(0x11 AS BINARY(5)) AS VARBINARY(5)) +GO +SELECT DATALENGTH(CAST(CAST(0x111213141516 AS BINARY(5)) AS VARBINARY(5))), CAST(CAST(0x111213141516 AS BINARY(5)) AS VARBINARY(5)) +GO + +CREATE TABLE babel_4544_t (id BINARY(5)) +GO + +INSERT INTO babel_4544_t VALUES (0x65), (0x656667) +GO +INSERT INTO babel_4544_t VALUES (0x6566676869707172) +GO +INSERT INTO babel_4544_t VALUES (CAST(0x6566676869707172 AS VARBINARY(6))) +GO +INSERT INTO babel_4544_t VALUES ('aa') +GO +INSERT INTO babel_4544_t VALUES (CAST('aaaaaa' AS VARBINARY)) +GO +INSERT INTO babel_4544_t VALUES (CAST('aaa' AS VARBINARY)) +GO +INSERT INTO babel_4544_t VALUES (CAST(0x65 AS VARBINARY)), (CAST(0x6564 AS VARBINARY(5))), (CAST(0x6566676869707172 AS VARBINARY(4))), (CAST(0x65666768 AS VARBINARY(6))) +GO + +SELECT *, DATALENGTH(id) FROM babel_4544_t +GO + +DROP TABLE babel_4544_t +GO + +-- default length should be 1 +DECLARE @A VARBINARY = 0x0123456789012345678901234567890123456789 +SELECT @A, DATALENGTH(@A) +SELECT DATALENGTH(CAST(@A as BINARY(50))), CAST(@A as BINARY(50)), CAST(@A as VARBINARY(60)) +GO + +DECLARE @A BINARY = 0x0123456789012345678901234567890123456789 +SELECT @A, DATALENGTH(@A) +SELECT DATALENGTH(CAST(@A as BINARY(50))), CAST(@A as BINARY(50)) +GO + +DECLARE @A BINARY = 0x012345678901234567890123456789012345678901234567890123456789 +SELECT DATALENGTH(@A), @A +SELECT DATALENGTH(CAST(@A as BINARY(50))), CAST(@A as BINARY(50)) +GO + +DECLARE @A BINARY = 0x01234567890123456789012345678901234567890123456789012345678901234567890123456789 +SELECT DATALENGTH(@A), @A +SELECT DATALENGTH(CAST(@A as BINARY(50))), CAST(@A as BINARY(50)) +GO + +DECLARE @A BINARY(10) = 0x012345678901234567890123456789 +SELECT DATALENGTH(@A), @A +SELECT DATALENGTH(CAST(@A as BINARY(50))), CAST(@A as BINARY(50)) +GO + +DECLARE @A BINARY(10) = 0x01234567890123456789 +SELECT DATALENGTH(@A), @A +SELECT DATALENGTH(CAST(@A as BINARY(50))), CAST(@A as BINARY(50)) +GO + +DECLARE @A BINARY(10) = 0x0123456789012345678901234567890123456789 +SELECT DATALENGTH(@A), @A +SELECT DATALENGTH(CAST(@A as BINARY(50))), CAST(@A as BINARY(50)) +GO + +SELECT DATALENGTH(CAST(CAST(0x11 AS VARBINARY(MAX)) AS BINARY(5))), CAST(CAST(0x11 AS VARBINARY(MAX)) AS BINARY(5)) +GO +SELECT DATALENGTH(CAST(CAST(0x111213141516 AS VARBINARY(MAX)) AS BINARY(5))), CAST(CAST(0x111213141516 AS VARBINARY(MAX)) AS BINARY(5)) +GO +SELECT DATALENGTH(CAST(CAST(0x11 AS BINARY(5)) AS VARBINARY(MAX))), CAST(CAST(0x11 AS BINARY(5)) AS VARBINARY(MAX)) +GO +SELECT DATALENGTH(CAST(CAST(0x111213141516 AS BINARY(5)) AS VARBINARY(MAX))), CAST(CAST(0x111213141516 AS BINARY(5)) AS VARBINARY(MAX)) +GO + +SELECT DATALENGTH(CAST(CAST(NULL AS VARBINARY(MAX)) AS BINARY(5))), CAST(CAST(NULL AS VARBINARY(MAX)) AS BINARY(5)) +GO +SELECT DATALENGTH(CAST(CAST(NULL AS VARBINARY(MAX)) AS BINARY(5))), CAST(CAST(NULL AS VARBINARY(MAX)) AS BINARY(5)) +GO +SELECT DATALENGTH(CAST(CAST(NULL AS BINARY(5)) AS VARBINARY(MAX))), CAST(CAST(NULL AS BINARY(5)) AS VARBINARY(MAX)) +GO +SELECT DATALENGTH(CAST(CAST(NULL AS BINARY(5)) AS VARBINARY(MAX))), CAST(CAST(NULL AS BINARY(5)) AS VARBINARY(MAX)) +GO diff --git a/test/JDBC/input/datatypes/TestBinary-vu-prepare.txt b/test/JDBC/input/datatypes/TestBinary-vu-prepare.txt index e020a180176..29cad2a4519 100644 --- a/test/JDBC/input/datatypes/TestBinary-vu-prepare.txt +++ b/test/JDBC/input/datatypes/TestBinary-vu-prepare.txt @@ -13,5 +13,5 @@ insert into testBINARY_dt3 (a,b,c,d,e,f,g,h,i) values (NULL,1,2,3,4,5,6,7,8); CREATE TABLE testBINARY_dt4(a BINARY(8), b VARBINARY(10)); INSERT INTO testBINARY_dt4(a, b) values (1234, 12345); prepst#!# INSERT INTO testBINARY_dt4(a, b) values(@a, @b) #!#binary|-|a|-|1234#!#varbinary|-|b|-|12345 -prepst#!#exec#!#binary|-|a|-|123456789#!#varbinary|-|b|-|12345 +prepst#!#exec#!#binary|-|a|-|12345678#!#varbinary|-|b|-|12345 prepst#!#exec#!#binary|-|a|-|1234#!#varbinary|-|b|-|123456789 \ No newline at end of file diff --git a/test/JDBC/input/datatypes/TestBinary.txt b/test/JDBC/input/datatypes/TestBinary.txt index 0d2ffb12071..e4f4c5a5396 100644 --- a/test/JDBC/input/datatypes/TestBinary.txt +++ b/test/JDBC/input/datatypes/TestBinary.txt @@ -21,7 +21,7 @@ drop table BINARY_dt; CREATE TABLE BINARY_dt(a BINARY(8), b VARBINARY(10)); INSERT INTO BINARY_dt(a, b) values (1234, 12345); prepst#!# INSERT INTO BINARY_dt(a, b) values(@a, @b) #!#binary|-|a|-|1234#!#varbinary|-|b|-|12345 -prepst#!#exec#!#binary|-|a|-|123456789#!#varbinary|-|b|-|12345 +prepst#!#exec#!#binary|-|a|-|12345678#!#varbinary|-|b|-|12345 prepst#!#exec#!#binary|-|a|-|1234#!#varbinary|-|b|-|123456789 SELECT * FROM BINARY_dt; DROP TABLE BINARY_dt; diff --git a/test/JDBC/jdbc_schedule b/test/JDBC/jdbc_schedule index 7f818c21f7e..b6924763223 100644 --- a/test/JDBC/jdbc_schedule +++ b/test/JDBC/jdbc_schedule @@ -103,6 +103,8 @@ ignore#!#orderby-before-15_3-vu-verify ignore#!#orderby-before-15_3-vu-cleanup ignore#!#babel_function_string-before-15-5-or-14-10-vu-prepare ignore#!#babel_function_string-before-15-5-or-14-10-vu-verify +ignore#!#BABEL-3166-before-14_11-or-15_6-vu-prepare +ignore#!#BABEL-3166-before-14_11-or-15_6-vu-verify # These tests are meant for upgrade scenario where source version is 13_X ignore#!#sys_database_principals_dep_for_13_x-vu-cleanup diff --git a/test/JDBC/upgrade/13_4/schedule b/test/JDBC/upgrade/13_4/schedule index 27ea64684b8..4f432148d1a 100644 --- a/test/JDBC/upgrade/13_4/schedule +++ b/test/JDBC/upgrade/13_4/schedule @@ -42,7 +42,7 @@ BABEL-3000-dep BABEL-3010-before-14_6 BABEL-3121 BABEL-3147-before-14_5 -BABEL-3166 +BABEL-3166-before-14_11-or-15_6 BABEL-3192 BABEL-3213 BABEL-3215 diff --git a/test/JDBC/upgrade/13_5/schedule b/test/JDBC/upgrade/13_5/schedule index ef8aea793a5..590d12425ff 100644 --- a/test/JDBC/upgrade/13_5/schedule +++ b/test/JDBC/upgrade/13_5/schedule @@ -44,7 +44,7 @@ BABEL-3000-dep BABEL-3010-before-14_6 BABEL-3121 BABEL-3147-before-14_5 -BABEL-3166 +BABEL-3166-before-14_11-or-15_6 BABEL-3192 BABEL-3204 BABEL-3213 diff --git a/test/JDBC/upgrade/13_6/schedule b/test/JDBC/upgrade/13_6/schedule index d08d27c5807..950296ca82a 100644 --- a/test/JDBC/upgrade/13_6/schedule +++ b/test/JDBC/upgrade/13_6/schedule @@ -57,7 +57,7 @@ BABEL-3116 BABEL-3118 BABEL-3121 BABEL-3147-before-14_5 -BABEL-3166 +BABEL-3166-before-14_11-or-15_6 BABEL-3192 BABEL-3204 BABEL-3213 diff --git a/test/JDBC/upgrade/13_7/schedule b/test/JDBC/upgrade/13_7/schedule index 00dc0f2cb80..24627ae502a 100644 --- a/test/JDBC/upgrade/13_7/schedule +++ b/test/JDBC/upgrade/13_7/schedule @@ -55,7 +55,7 @@ BABEL-3116 BABEL-3118 BABEL-3121 BABEL-3147-before-14_5 -BABEL-3166 +BABEL-3166-before-14_11-or-15_6 BABEL-3192 BABEL-3204 BABEL-3213 diff --git a/test/JDBC/upgrade/13_8/schedule b/test/JDBC/upgrade/13_8/schedule index 00dc0f2cb80..24627ae502a 100644 --- a/test/JDBC/upgrade/13_8/schedule +++ b/test/JDBC/upgrade/13_8/schedule @@ -55,7 +55,7 @@ BABEL-3116 BABEL-3118 BABEL-3121 BABEL-3147-before-14_5 -BABEL-3166 +BABEL-3166-before-14_11-or-15_6 BABEL-3192 BABEL-3204 BABEL-3213 diff --git a/test/JDBC/upgrade/13_9/schedule b/test/JDBC/upgrade/13_9/schedule index 9ac121cf80a..69a90c486a4 100644 --- a/test/JDBC/upgrade/13_9/schedule +++ b/test/JDBC/upgrade/13_9/schedule @@ -55,7 +55,7 @@ BABEL-3116 BABEL-3118 BABEL-3121 BABEL-3147-before-14_5 -BABEL-3166 +BABEL-3166-before-14_11-or-15_6 BABEL-3192 BABEL-3204 BABEL-3213 diff --git a/test/JDBC/upgrade/14_10/schedule b/test/JDBC/upgrade/14_10/schedule index 96781d48d54..0e41109e4a6 100644 --- a/test/JDBC/upgrade/14_10/schedule +++ b/test/JDBC/upgrade/14_10/schedule @@ -46,7 +46,7 @@ sys-suser_sid sys-trigger_events BABEL-2688 BABEL-328 -BABEL-3166 +BABEL-3166-before-14_11-or-15_6 BABEL-3192 BABEL-3221 BABEL-3204 diff --git a/test/JDBC/upgrade/14_3/schedule b/test/JDBC/upgrade/14_3/schedule index be86bdb9fe9..f6eeefb8f1d 100644 --- a/test/JDBC/upgrade/14_3/schedule +++ b/test/JDBC/upgrade/14_3/schedule @@ -57,7 +57,7 @@ BABEL-3116 BABEL-3118 BABEL-3121 BABEL-3147-before-14_5 -BABEL-3166 +BABEL-3166-before-14_11-or-15_6 BABEL-3192 BABEL-3204 BABEL-3213 diff --git a/test/JDBC/upgrade/14_5/schedule b/test/JDBC/upgrade/14_5/schedule index 3356bf268ff..9794a6378ec 100644 --- a/test/JDBC/upgrade/14_5/schedule +++ b/test/JDBC/upgrade/14_5/schedule @@ -55,7 +55,7 @@ BABEL-3116 BABEL-3118 BABEL-3121 BABEL-3147 -BABEL-3166 +BABEL-3166-before-14_11-or-15_6 BABEL-3192 BABEL-3204 BABEL-3213 diff --git a/test/JDBC/upgrade/14_6/schedule b/test/JDBC/upgrade/14_6/schedule index 0402bc87fd9..17e71850048 100644 --- a/test/JDBC/upgrade/14_6/schedule +++ b/test/JDBC/upgrade/14_6/schedule @@ -61,7 +61,7 @@ BABEL-3118 BABEL-3121 BABEL-3144 BABEL-3147 -BABEL-3166 +BABEL-3166-before-14_11-or-15_6 BABEL-3192 BABEL-3204 BABEL-3213 diff --git a/test/JDBC/upgrade/14_7/schedule b/test/JDBC/upgrade/14_7/schedule index 83741ce9263..4b26b557cf6 100644 --- a/test/JDBC/upgrade/14_7/schedule +++ b/test/JDBC/upgrade/14_7/schedule @@ -63,7 +63,7 @@ BABEL-3118 BABEL-3121 BABEL-3144 BABEL-3147 -BABEL-3166 +BABEL-3166-before-14_11-or-15_6 BABEL-3192 BABEL-3204 BABEL-3213 diff --git a/test/JDBC/upgrade/14_8/schedule b/test/JDBC/upgrade/14_8/schedule index b5a6f5bd98f..72055a03d55 100644 --- a/test/JDBC/upgrade/14_8/schedule +++ b/test/JDBC/upgrade/14_8/schedule @@ -63,7 +63,7 @@ BABEL-3118 BABEL-3121 BABEL-3144 BABEL-3147 -BABEL-3166 +BABEL-3166-before-14_11-or-15_6 BABEL-3192 BABEL-3204 BABEL-3213 diff --git a/test/JDBC/upgrade/14_9/schedule b/test/JDBC/upgrade/14_9/schedule index d2ce7754c03..fa6aa2b0dfd 100644 --- a/test/JDBC/upgrade/14_9/schedule +++ b/test/JDBC/upgrade/14_9/schedule @@ -46,7 +46,7 @@ sys-suser_sid sys-trigger_events BABEL-2688 BABEL-328 -BABEL-3166 +BABEL-3166-before-14_11-or-15_6 BABEL-3192 BABEL-3221 BABEL-3204 diff --git a/test/JDBC/upgrade/15_1/schedule b/test/JDBC/upgrade/15_1/schedule index c110a5bbb61..f7664b4c933 100644 --- a/test/JDBC/upgrade/15_1/schedule +++ b/test/JDBC/upgrade/15_1/schedule @@ -61,7 +61,7 @@ BABEL-3118 BABEL-3121 BABEL-3144 BABEL-3147 -BABEL-3166 +BABEL-3166-before-14_11-or-15_6 BABEL-3192 BABEL-3204 BABEL-3213 diff --git a/test/JDBC/upgrade/15_2/schedule b/test/JDBC/upgrade/15_2/schedule index 360ab42139c..dba1dcc64e1 100644 --- a/test/JDBC/upgrade/15_2/schedule +++ b/test/JDBC/upgrade/15_2/schedule @@ -63,7 +63,7 @@ BABEL-3118 BABEL-3121 BABEL-3144 BABEL-3147 -BABEL-3166 +BABEL-3166-before-14_11-or-15_6 BABEL-3192 BABEL-3204 BABEL-3213 diff --git a/test/JDBC/upgrade/15_3/schedule b/test/JDBC/upgrade/15_3/schedule index 2d880d5b185..79257f65421 100644 --- a/test/JDBC/upgrade/15_3/schedule +++ b/test/JDBC/upgrade/15_3/schedule @@ -65,7 +65,7 @@ BABEL-3118 BABEL-3121 BABEL-3144 BABEL-3147 -BABEL-3166 +BABEL-3166-before-14_11-or-15_6 BABEL-3192 BABEL-3204 BABEL-3213 diff --git a/test/JDBC/upgrade/15_4/schedule b/test/JDBC/upgrade/15_4/schedule index 53f89f149a6..b95d1ccdf31 100644 --- a/test/JDBC/upgrade/15_4/schedule +++ b/test/JDBC/upgrade/15_4/schedule @@ -65,7 +65,7 @@ BABEL-3118 BABEL-3121 BABEL-3144 BABEL-3147 -BABEL-3166 +BABEL-3166-before-14_11-or-15_6 BABEL-3192 BABEL-3204 BABEL-3213 diff --git a/test/JDBC/upgrade/15_5/schedule b/test/JDBC/upgrade/15_5/schedule index bbc567402e2..6821db22a05 100644 --- a/test/JDBC/upgrade/15_5/schedule +++ b/test/JDBC/upgrade/15_5/schedule @@ -65,7 +65,7 @@ BABEL-3118 BABEL-3121 BABEL-3144 BABEL-3147 -BABEL-3166 +BABEL-3166-before-14_11-or-15_6 BABEL-3192 BABEL-3204 BABEL-3213 diff --git a/test/python/expected/sql_validation_framework/expected_drop.out b/test/python/expected/sql_validation_framework/expected_drop.out index da92ef23345..6d1d01837f5 100644 --- a/test/python/expected/sql_validation_framework/expected_drop.out +++ b/test/python/expected/sql_validation_framework/expected_drop.out @@ -9,6 +9,7 @@ Unexpected drop found for function sys.babelfish_update_server_collation_name in Unexpected drop found for function sys.babelfish_update_server_collation_name in file babelfishpg_common--2.3.0--3.0.0.sql Unexpected drop found for function sys.babelfish_update_server_collation_name in file babelfishpg_common--2.4.0--3.0.0.sql Unexpected drop found for function sys.babelfish_update_server_collation_name in file babelfishpg_common--2.5.0--3.0.0.sql +Unexpected drop found for function sys.babelfish_update_server_collation_name in file babelfishpg_common--2.6.0--3.0.0.sql Unexpected drop found for function sys.babelfish_update_server_collation_name in file babelfishpg_tsql--2.0.0--2.1.0.sql Unexpected drop found for function sys.babelfish_update_server_collation_name in file babelfishpg_tsql--2.3.0--3.0.0.sql Unexpected drop found for function sys.babelfish_update_server_collation_name in file babelfishpg_tsql--2.4.0--3.0.0.sql