diff --git a/contrib/babelfishpg_tds/src/backend/tds/tdsrpc.c b/contrib/babelfishpg_tds/src/backend/tds/tdsrpc.c index 03890f43a3..d5f29ef73f 100644 --- a/contrib/babelfishpg_tds/src/backend/tds/tdsrpc.c +++ b/contrib/babelfishpg_tds/src/backend/tds/tdsrpc.c @@ -188,7 +188,6 @@ DeclareVariables(TDSRequestSP req, FunctionCallInfo *fcinfo, unsigned long optio ParameterToken token = NULL; int i = 0, index = 0; - bool resolveParamNames = false; char *tmp = NULL, *fToken = NULL; @@ -214,14 +213,10 @@ DeclareVariables(TDSRequestSP req, FunctionCallInfo *fcinfo, unsigned long optio args->argmodes = (char *) palloc(sizeof(char) * args->numargs); /* - * We have the assumption that either all parameters will have names or - * none of them will have. So, check the parameter name for the first - * token and set the flag. If above assumption is invalid, then we will - * raise the error in below for loop. + * Check the parameter name for the first token and set the flag. */ if (req->dataParameter->paramMeta.colName.len == 0) { - resolveParamNames = true; if (req->metaDataParameterValue->len) { tmp = pnstrdup(req->metaDataParameterValue->data, @@ -273,16 +268,17 @@ DeclareVariables(TDSRequestSP req, FunctionCallInfo *fcinfo, unsigned long optio * varchar))to the pltsql ? Also, maybe we can use the raw_parser() * directly for getting the parameter names */ - if (resolveParamNames && (name->len)) - ereport(ERROR, - (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("not all Parameters have names"))); - else if (resolveParamNames) + /* + * When the client driver doesn't specify the + * parameter name along with the parameter token + * then we need to generate the parameter name. + */ + if (!name->len) { char buf[10]; snprintf(buf, sizeof(buf), "@p%d", i); - paramName = pnstrdup(buf, strlen(buf));; + paramName = pnstrdup(buf, strlen(buf)); } else paramName = downcase_truncate_identifier(name->data, diff --git a/contrib/babelfishpg_tds/src/backend/tds/tdstypeio.c b/contrib/babelfishpg_tds/src/backend/tds/tdstypeio.c index 8cc5f7dab2..82d64c1ecc 100644 --- a/contrib/babelfishpg_tds/src/backend/tds/tdstypeio.c +++ b/contrib/babelfishpg_tds/src/backend/tds/tdstypeio.c @@ -2388,11 +2388,12 @@ TdsRecvTypeTable(const char *message, const ParameterToken token) } SPI_finish(); - PopActiveSnapshot(); - if (!xactStarted) - CommitTransactionCommand(); } + PopActiveSnapshot(); + if (!xactStarted) + CommitTransactionCommand(); + set_config_option("babelfishpg_tsql.sql_dialect", "tsql", GUC_CONTEXT_CONFIG, PGC_S_SESSION, GUC_ACTION_SAVE, true, 0, false); diff --git a/contrib/babelfishpg_tsql/sql/babelfishpg_tsql.sql b/contrib/babelfishpg_tsql/sql/babelfishpg_tsql.sql index af56baa68d..b6f773ce6e 100644 --- a/contrib/babelfishpg_tsql/sql/babelfishpg_tsql.sql +++ b/contrib/babelfishpg_tsql/sql/babelfishpg_tsql.sql @@ -994,10 +994,10 @@ CREATE OR REPLACE FUNCTION sys.sp_tables_internal( DECLARE opt_view sys.varchar(16) = ''; DECLARE cs_as_in_table_type varchar COLLATE "C" = in_table_type; BEGIN - IF (SELECT count(*) FROM unnest(string_to_array(cs_as_in_table_type, ',')) WHERE upper(trim(unnest)) = '''TABLE''' OR upper(trim(unnest)) = '''''''TABLE''''''') >= 1 THEN + IF upper(cs_as_in_table_type) LIKE '%''TABLE''%' THEN opt_table = 'TABLE'; END IF; - IF (SELECT count(*) from unnest(string_to_array(cs_as_in_table_type, ',')) WHERE upper(trim(unnest)) = '''VIEW''' OR upper(trim(unnest)) = '''''''VIEW''''''') >= 1 THEN + IF upper(cs_as_in_table_type) LIKE '%''VIEW''%' THEN opt_view = 'VIEW'; END IF; IF in_fusepattern = 1 THEN diff --git a/contrib/babelfishpg_tsql/sql/upgrades/babelfishpg_tsql--2.8.0--2.9.0.sql b/contrib/babelfishpg_tsql/sql/upgrades/babelfishpg_tsql--2.8.0--2.9.0.sql index a2ec2e8d78..5c52c9d009 100644 --- a/contrib/babelfishpg_tsql/sql/upgrades/babelfishpg_tsql--2.8.0--2.9.0.sql +++ b/contrib/babelfishpg_tsql/sql/upgrades/babelfishpg_tsql--2.8.0--2.9.0.sql @@ -268,6 +268,67 @@ and has_table_privilege(t.oid, 'SELECT,INSERT,UPDATE,DELETE,TRUNCATE,TRIGGER') order by object_id, type_desc; GRANT SELECT ON sys.indexes TO PUBLIC; +CREATE OR REPLACE FUNCTION sys.sp_tables_internal( + in_table_name sys.nvarchar(384) = '', + in_table_owner sys.nvarchar(384) = '', + in_table_qualifier sys.sysname = '', + in_table_type sys.varchar(100) = '', + in_fusepattern sys.bit = '1') + RETURNS TABLE ( + out_table_qualifier sys.sysname, + out_table_owner sys.sysname, + out_table_name sys.sysname, + out_table_type sys.varchar(32), + out_remarks sys.varchar(254) + ) + AS $$ + DECLARE opt_table sys.varchar(16) = ''; + DECLARE opt_view sys.varchar(16) = ''; + DECLARE cs_as_in_table_type varchar COLLATE "C" = in_table_type; + BEGIN + IF upper(cs_as_in_table_type) LIKE '%''TABLE''%' THEN + opt_table = 'TABLE'; + END IF; + IF upper(cs_as_in_table_type) LIKE '%''VIEW''%' THEN + opt_view = 'VIEW'; + END IF; + IF in_fusepattern = 1 THEN + RETURN query + SELECT + CAST(table_qualifier AS sys.sysname) AS TABLE_QUALIFIER, + CAST(table_owner AS sys.sysname) AS TABLE_OWNER, + CAST(table_name AS sys.sysname) AS TABLE_NAME, + CAST(table_type AS sys.varchar(32)) AS TABLE_TYPE, + CAST(remarks AS sys.varchar(254)) AS REMARKS + FROM sys.sp_tables_view + WHERE ((SELECT coalesce(in_table_name,'')) = '' OR table_name LIKE in_table_name collate sys.database_default) + AND ((SELECT coalesce(in_table_owner,'')) = '' OR table_owner LIKE in_table_owner collate sys.database_default) + AND ((SELECT coalesce(in_table_qualifier,'')) = '' OR table_qualifier LIKE in_table_qualifier collate sys.database_default) + AND ((SELECT coalesce(cs_as_in_table_type,'')) = '' + OR table_type = opt_table + OR table_type = opt_view) + ORDER BY table_qualifier, table_owner, table_name; + ELSE + RETURN query + SELECT + CAST(table_qualifier AS sys.sysname) AS TABLE_QUALIFIER, + CAST(table_owner AS sys.sysname) AS TABLE_OWNER, + CAST(table_name AS sys.sysname) AS TABLE_NAME, + CAST(table_type AS sys.varchar(32)) AS TABLE_TYPE, + CAST(remarks AS sys.varchar(254)) AS REMARKS + FROM sys.sp_tables_view + WHERE ((SELECT coalesce(in_table_name,'')) = '' OR table_name = in_table_name collate sys.database_default) + AND ((SELECT coalesce(in_table_owner,'')) = '' OR table_owner = in_table_owner collate sys.database_default) + AND ((SELECT coalesce(in_table_qualifier,'')) = '' OR table_qualifier = in_table_qualifier collate sys.database_default) + AND ((SELECT coalesce(cs_as_in_table_type,'')) = '' + OR table_type = opt_table + OR table_type = opt_view) + ORDER BY table_qualifier, table_owner, table_name; + END IF; + END; +$$ +LANGUAGE plpgsql STABLE; + -- Drops the temporary procedure used by the upgrade script. -- Please have this be one of the last statements executed in this upgrade script. DROP PROCEDURE sys.babelfish_drop_deprecated_object(varchar, varchar, varchar); diff --git a/test/JDBC/expected/BABEL-4707-vu-cleanup.out b/test/JDBC/expected/BABEL-4707-vu-cleanup.out new file mode 100644 index 0000000000..73ff71e8f9 --- /dev/null +++ b/test/JDBC/expected/BABEL-4707-vu-cleanup.out @@ -0,0 +1,9 @@ +DROP Procedure IF EXISTS spUpdateTaxCode; +DROP Procedure IF EXISTS spUpdateTaxCode1; +DROP Procedure IF EXISTS spUpdateTaxCode2; +DROP Procedure IF EXISTS spUpdateTaxCode3; +DROP Procedure IF EXISTS spUpdateTaxCode4; +DROP Procedure IF EXISTS spUpdateTaxCode5; +DROP Procedure IF EXISTS spUpdateTaxCode6; +DROP Procedure IF EXISTS spUpdateTaxCode7; +DROP Type IF EXISTS dtTaxRate; diff --git a/test/JDBC/expected/BABEL-4707-vu-prepare.out b/test/JDBC/expected/BABEL-4707-vu-prepare.out new file mode 100644 index 0000000000..8e994898f7 --- /dev/null +++ b/test/JDBC/expected/BABEL-4707-vu-prepare.out @@ -0,0 +1,17 @@ +CREATE TYPE dbo.dtTaxRate AS TABLE ( a int, b smallint ); + +CREATE PROCEDURE [dbo].[spUpdateTaxCode] ( @taxCodeId BIGINT, @code VARCHAR(80), @countryId BIGINT, @taxRateTypeId INT, @description VARCHAR(MAX) = NULL, @lastUpdatedBy VARCHAR(80), @editorId BIGINT = NULL, @taxRates dtTaxRate READONLY) AS BEGIN SELECT 1; END; + +CREATE PROCEDURE [dbo].[spUpdateTaxCode1] ( @taxCodeId BIGINT, @code VARCHAR(80), @countryId BIGINT, @taxRateTypeId INT, @description VARCHAR(MAX) = NULL, @lastUpdatedBy VARCHAR(80), @editorId BIGINT = NULL, @taxRates dtTaxRate READONLY, @id BIGINT = NULL) AS BEGIN SELECT 1; END; + +CREATE PROCEDURE [dbo].[spUpdateTaxCode2] ( @taxCodeId BIGINT, @code VARCHAR(80), @countryId BIGINT, @taxRateTypeId INT, @description VARCHAR(MAX) = NULL, @lastUpdatedBy VARCHAR(80), @editorId BIGINT = NULL, @taxRates dtTaxRate READONLY, @id BIGINT = NULL, @taxRates1 dtTaxRate READONLY) AS BEGIN SELECT 1; END; + +CREATE PROCEDURE [dbo].[spUpdateTaxCode3] ( @taxCodeId BIGINT, @code VARCHAR(80), @countryId BIGINT, @taxRateTypeId INT, @description VARCHAR(MAX) = NULL, @lastUpdatedBy VARCHAR(80), @editorId BIGINT = NULL) AS BEGIN SELECT 1; END; + +CREATE PROCEDURE [dbo].[spUpdateTaxCode4] ( @taxRates dtTaxRate READONLY, @taxRates1 dtTaxRate READONLY, @taxRates2 dtTaxRate READONLY, @taxCodeId BIGINT) AS BEGIN SELECT 1; END; + +CREATE PROCEDURE [dbo].[spUpdateTaxCode5] ( @taxRates dtTaxRate READONLY, @taxRates1 dtTaxRate READONLY, @taxRates2 dtTaxRate READONLY, @taxCodeId BIGINT, @taxRates3 dtTaxRate READONLY) AS BEGIN SELECT 1; END; + +CREATE PROCEDURE [dbo].[spUpdateTaxCode6] ( @taxRates dtTaxRate READONLY, @taxRates1 dtTaxRate READONLY, @taxRates2 dtTaxRate READONLY, @taxCodeId BIGINT, @taxRates3 dtTaxRate READONLY, @Id BIGINT) AS BEGIN SELECT 1; END; + +CREATE PROCEDURE [dbo].[spUpdateTaxCode7] ( @taxRates dtTaxRate READONLY, @taxRates1 dtTaxRate READONLY, @taxRates2 dtTaxRate READONLY) AS BEGIN SELECT 1; END; diff --git a/test/JDBC/expected/BABEL-4707-vu-verify.out b/test/JDBC/expected/BABEL-4707-vu-verify.out new file mode 100644 index 0000000000..b4371e572c --- /dev/null +++ b/test/JDBC/expected/BABEL-4707-vu-verify.out @@ -0,0 +1,151 @@ +prepst#!#spUpdateTaxCode ?, ?, ?, ?, ?, ?, ?, ? #!#BIGINT|-|taxCodeId|-|236223201910#!#VARCHAR|-|code|-|"DIVIDEND"#!#BIGINT|-|countryId|-|42949673205#!#INT|-|taxRateTypeId|-|10#!#VARCHAR|-|description|-|"Test_desc"#!#VARCHAR|-|lastUpdatedBy|-|"TestProcess"#!#BIGINT|-|editorId|-|289#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv +~~START~~ +int +1 +~~END~~ + +prepst#!#exec#!#BIGINT|-|taxCodeId|-|236223201910#!#VARCHAR|-|code|-|"DIVIDEND"#!#BIGINT|-|countryId|-|42949673205#!#INT|-|taxRateTypeId|-|10#!#VARCHAR|-|description|-|"Test_desc"#!#VARCHAR|-|lastUpdatedBy|-|"TestProcess"#!#BIGINT|-|editorId|-|289#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv +~~START~~ +int +1 +~~END~~ + +prepst#!#exec#!#BIGINT|-|taxCodeId|-|236223201910#!#VARCHAR|-|code|-|"DIVIDEND"#!#BIGINT|-|countryId|-|42949673205#!#INT|-|taxRateTypeId|-|10#!#VARCHAR|-|description|-|"Test_desc"#!#VARCHAR|-|lastUpdatedBy|-|"TestProcess"#!#BIGINT|-|editorId|-|289#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv +~~START~~ +int +1 +~~END~~ + + +prepst#!#spUpdateTaxCode1 ?, ?, ?, ?, ?, ?, ?, ?, ? #!#BIGINT|-|taxCodeId|-|236223201910#!#VARCHAR|-|code|-|"DIVIDEND"#!#BIGINT|-|countryId|-|42949673205#!#INT|-|taxRateTypeId|-|10#!#VARCHAR|-|description|-|"Test_desc"#!#VARCHAR|-|lastUpdatedBy|-|"TestProcess"#!#BIGINT|-|editorId|-|289#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#BIGINT|-|id|-|42949673205 +~~START~~ +int +1 +~~END~~ + +prepst#!#exec#!#BIGINT|-|taxCodeId|-|236223201910#!#VARCHAR|-|code|-|"DIVIDEND"#!#BIGINT|-|countryId|-|42949673205#!#INT|-|taxRateTypeId|-|10#!#VARCHAR|-|description|-|"Test_desc"#!#VARCHAR|-|lastUpdatedBy|-|"TestProcess"#!#BIGINT|-|editorId|-|289#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#BIGINT|-|id|-|42949673205 +~~START~~ +int +1 +~~END~~ + +prepst#!#exec#!#BIGINT|-|taxCodeId|-|236223201910#!#VARCHAR|-|code|-|"DIVIDEND"#!#BIGINT|-|countryId|-|42949673205#!#INT|-|taxRateTypeId|-|10#!#VARCHAR|-|description|-|"Test_desc"#!#VARCHAR|-|lastUpdatedBy|-|"TestProcess"#!#BIGINT|-|editorId|-|289#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#BIGINT|-|id|-|42949673205 +~~START~~ +int +1 +~~END~~ + + +prepst#!#spUpdateTaxCode2 ?, ?, ?, ?, ?, ?, ?, ?, ?, ? #!#BIGINT|-|taxCodeId|-|236223201910#!#VARCHAR|-|code|-|"DIVIDEND"#!#BIGINT|-|countryId|-|42949673205#!#INT|-|taxRateTypeId|-|10#!#VARCHAR|-|description|-|"Test_desc"#!#VARCHAR|-|lastUpdatedBy|-|"TestProcess"#!#BIGINT|-|editorId|-|289#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#BIGINT|-|id|-|42949673205#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv +~~START~~ +int +1 +~~END~~ + +prepst#!#exec#!#BIGINT|-|taxCodeId|-|236223201910#!#VARCHAR|-|code|-|"DIVIDEND"#!#BIGINT|-|countryId|-|42949673205#!#INT|-|taxRateTypeId|-|10#!#VARCHAR|-|description|-|"Test_desc"#!#VARCHAR|-|lastUpdatedBy|-|"TestProcess"#!#BIGINT|-|editorId|-|289#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#BIGINT|-|id|-|42949673205#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv +~~START~~ +int +1 +~~END~~ + +prepst#!#exec#!#BIGINT|-|taxCodeId|-|236223201910#!#VARCHAR|-|code|-|"DIVIDEND"#!#BIGINT|-|countryId|-|42949673205#!#INT|-|taxRateTypeId|-|10#!#VARCHAR|-|description|-|"Test_desc"#!#VARCHAR|-|lastUpdatedBy|-|"TestProcess"#!#BIGINT|-|editorId|-|289#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#BIGINT|-|id|-|42949673205#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv +~~START~~ +int +1 +~~END~~ + + +prepst#!#spUpdateTaxCode3 ?, ?, ?, ?, ?, ?, ? #!#BIGINT|-|taxCodeId|-|236223201910#!#VARCHAR|-|code|-|"DIVIDEND"#!#BIGINT|-|countryId|-|42949673205#!#INT|-|taxRateTypeId|-|10#!#VARCHAR|-|description|-|"Test_desc"#!#VARCHAR|-|lastUpdatedBy|-|"TestProcess"#!#BIGINT|-|editorId|-|289 +~~START~~ +int +1 +~~END~~ + +prepst#!#exec#!#BIGINT|-|taxCodeId|-|236223201910#!#VARCHAR|-|code|-|"DIVIDEND"#!#BIGINT|-|countryId|-|42949673205#!#INT|-|taxRateTypeId|-|10#!#VARCHAR|-|description|-|"Test_desc"#!#VARCHAR|-|lastUpdatedBy|-|"TestProcess"#!#BIGINT|-|editorId|-|289 +~~START~~ +int +1 +~~END~~ + +prepst#!#exec#!#BIGINT|-|taxCodeId|-|236223201910#!#VARCHAR|-|code|-|"DIVIDEND"#!#BIGINT|-|countryId|-|42949673205#!#INT|-|taxRateTypeId|-|10#!#VARCHAR|-|description|-|"Test_desc"#!#VARCHAR|-|lastUpdatedBy|-|"TestProcess"#!#BIGINT|-|editorId|-|289 +~~START~~ +int +1 +~~END~~ + + +prepst#!#spUpdateTaxCode4 ?, ?, ?, ? #!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#BIGINT|-|taxCodeId|-|236223201910 +~~START~~ +int +1 +~~END~~ + +prepst#!#exec#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#BIGINT|-|taxCodeId|-|236223201910 +~~START~~ +int +1 +~~END~~ + +prepst#!#exec#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#BIGINT|-|taxCodeId|-|236223201910 +~~START~~ +int +1 +~~END~~ + + +prepst#!#spUpdateTaxCode5 ?, ?, ?, ?, ? #!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#BIGINT|-|taxCodeId|-|236223201910#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv +~~START~~ +int +1 +~~END~~ + +prepst#!#exec#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#BIGINT|-|taxCodeId|-|236223201910#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv +~~START~~ +int +1 +~~END~~ + +prepst#!#exec#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#BIGINT|-|taxCodeId|-|236223201910#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv +~~START~~ +int +1 +~~END~~ + + +prepst#!#spUpdateTaxCode6 ?, ?, ?, ?, ?, ? #!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#BIGINT|-|taxCodeId|-|236223201910#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#BIGINT|-|id|-|42949673205 +~~START~~ +int +1 +~~END~~ + +prepst#!#exec#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#BIGINT|-|taxCodeId|-|236223201910#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#BIGINT|-|id|-|42949673205 +~~START~~ +int +1 +~~END~~ + +prepst#!#exec#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#BIGINT|-|taxCodeId|-|236223201910#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#BIGINT|-|id|-|42949673205 +~~START~~ +int +1 +~~END~~ + + +prepst#!#spUpdateTaxCode7 ?, ?, ? #!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv +~~START~~ +int +1 +~~END~~ + +prepst#!#exec#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv +~~START~~ +int +1 +~~END~~ + +prepst#!#exec#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv +~~START~~ +int +1 +~~END~~ + diff --git a/test/JDBC/expected/BABEL-SP_TABLES.out b/test/JDBC/expected/BABEL-SP_TABLES.out index d590ac8320..fb85f173ff 100644 --- a/test/JDBC/expected/BABEL-SP_TABLES.out +++ b/test/JDBC/expected/BABEL-SP_TABLES.out @@ -287,6 +287,81 @@ db1#!#dbo#!#t_sptables#!#TABLE#!# ~~END~~ +-- table_type list +exec [sys].sp_tables 't_sptable%','dbo',NULL,'''TABLE'',''VIEW''' +go +~~START~~ +varchar#!#varchar#!#varchar#!#varchar#!#varchar +db1#!#dbo#!#t_sptables#!#TABLE#!# +db1#!#dbo#!#t_sptables2#!#TABLE#!# +db1#!#dbo#!#t_sptables5#!#VIEW#!# +~~END~~ + +-- table_type list with unsupported type +exec [sys].sp_tables 't_sptable%','dbo',NULL,'''TABLE'',''VIEW'',''SYSTEM TABLE''' +go +~~START~~ +varchar#!#varchar#!#varchar#!#varchar#!#varchar +db1#!#dbo#!#t_sptables#!#TABLE#!# +db1#!#dbo#!#t_sptables2#!#TABLE#!# +db1#!#dbo#!#t_sptables5#!#VIEW#!# +~~END~~ + +-- table_type list without tables +exec [sys].sp_tables 't_sptable%','dbo',NULL,'''VIEW'',''SYSTEM TABLE''' +go +~~START~~ +varchar#!#varchar#!#varchar#!#varchar#!#varchar +db1#!#dbo#!#t_sptables5#!#VIEW#!# +~~END~~ + +-- table_type list without views +exec [sys].sp_tables 't_sptable%','dbo',NULL,'''TABLE'',''SYSTEM TABLE''' +go +~~START~~ +varchar#!#varchar#!#varchar#!#varchar#!#varchar +db1#!#dbo#!#t_sptables#!#TABLE#!# +db1#!#dbo#!#t_sptables2#!#TABLE#!# +~~END~~ + +-- table_type list with double-escaping +exec [sys].sp_tables 't_sptable%','dbo',NULL,'''''''TABLE'''',''''VIEW'''',''''SYSTEM TABLE''''''' +go +~~START~~ +varchar#!#varchar#!#varchar#!#varchar#!#varchar +db1#!#dbo#!#t_sptables#!#TABLE#!# +db1#!#dbo#!#t_sptables2#!#TABLE#!# +db1#!#dbo#!#t_sptables5#!#VIEW#!# +~~END~~ + +-- table_type list with unbalanced quotes +exec [sys].sp_tables 't_sptable%','dbo',NULL,'''TABLE'''''',''''VIEW'',''SYSTEM TABLE''' +go +~~START~~ +varchar#!#varchar#!#varchar#!#varchar#!#varchar +db1#!#dbo#!#t_sptables#!#TABLE#!# +db1#!#dbo#!#t_sptables2#!#TABLE#!# +db1#!#dbo#!#t_sptables5#!#VIEW#!# +~~END~~ + +-- table_type list with spaces +exec [sys].sp_tables 't_sptable%','dbo',NULL,'''TABLE '','' VIEW'',''SYSTEM TABLE''' +go +~~START~~ +varchar#!#varchar#!#varchar#!#varchar#!#varchar +~~END~~ + +-- table_type list with mixed case +exec [sys].sp_tables 't_sptable%','dbo',NULL,'''Table'',''View'',''System Table''' +go +~~START~~ +varchar#!#varchar#!#varchar#!#varchar#!#varchar +db1#!#dbo#!#t_sptables#!#TABLE#!# +db1#!#dbo#!#t_sptables2#!#TABLE#!# +db1#!#dbo#!#t_sptables5#!#VIEW#!# +~~END~~ + + drop view t_sptables5 go drop table t_sptables diff --git a/test/JDBC/input/BABEL-4707-vu-cleanup.txt b/test/JDBC/input/BABEL-4707-vu-cleanup.txt new file mode 100644 index 0000000000..73ff71e8f9 --- /dev/null +++ b/test/JDBC/input/BABEL-4707-vu-cleanup.txt @@ -0,0 +1,9 @@ +DROP Procedure IF EXISTS spUpdateTaxCode; +DROP Procedure IF EXISTS spUpdateTaxCode1; +DROP Procedure IF EXISTS spUpdateTaxCode2; +DROP Procedure IF EXISTS spUpdateTaxCode3; +DROP Procedure IF EXISTS spUpdateTaxCode4; +DROP Procedure IF EXISTS spUpdateTaxCode5; +DROP Procedure IF EXISTS spUpdateTaxCode6; +DROP Procedure IF EXISTS spUpdateTaxCode7; +DROP Type IF EXISTS dtTaxRate; diff --git a/test/JDBC/input/BABEL-4707-vu-prepare.txt b/test/JDBC/input/BABEL-4707-vu-prepare.txt new file mode 100644 index 0000000000..8e994898f7 --- /dev/null +++ b/test/JDBC/input/BABEL-4707-vu-prepare.txt @@ -0,0 +1,17 @@ +CREATE TYPE dbo.dtTaxRate AS TABLE ( a int, b smallint ); + +CREATE PROCEDURE [dbo].[spUpdateTaxCode] ( @taxCodeId BIGINT, @code VARCHAR(80), @countryId BIGINT, @taxRateTypeId INT, @description VARCHAR(MAX) = NULL, @lastUpdatedBy VARCHAR(80), @editorId BIGINT = NULL, @taxRates dtTaxRate READONLY) AS BEGIN SELECT 1; END; + +CREATE PROCEDURE [dbo].[spUpdateTaxCode1] ( @taxCodeId BIGINT, @code VARCHAR(80), @countryId BIGINT, @taxRateTypeId INT, @description VARCHAR(MAX) = NULL, @lastUpdatedBy VARCHAR(80), @editorId BIGINT = NULL, @taxRates dtTaxRate READONLY, @id BIGINT = NULL) AS BEGIN SELECT 1; END; + +CREATE PROCEDURE [dbo].[spUpdateTaxCode2] ( @taxCodeId BIGINT, @code VARCHAR(80), @countryId BIGINT, @taxRateTypeId INT, @description VARCHAR(MAX) = NULL, @lastUpdatedBy VARCHAR(80), @editorId BIGINT = NULL, @taxRates dtTaxRate READONLY, @id BIGINT = NULL, @taxRates1 dtTaxRate READONLY) AS BEGIN SELECT 1; END; + +CREATE PROCEDURE [dbo].[spUpdateTaxCode3] ( @taxCodeId BIGINT, @code VARCHAR(80), @countryId BIGINT, @taxRateTypeId INT, @description VARCHAR(MAX) = NULL, @lastUpdatedBy VARCHAR(80), @editorId BIGINT = NULL) AS BEGIN SELECT 1; END; + +CREATE PROCEDURE [dbo].[spUpdateTaxCode4] ( @taxRates dtTaxRate READONLY, @taxRates1 dtTaxRate READONLY, @taxRates2 dtTaxRate READONLY, @taxCodeId BIGINT) AS BEGIN SELECT 1; END; + +CREATE PROCEDURE [dbo].[spUpdateTaxCode5] ( @taxRates dtTaxRate READONLY, @taxRates1 dtTaxRate READONLY, @taxRates2 dtTaxRate READONLY, @taxCodeId BIGINT, @taxRates3 dtTaxRate READONLY) AS BEGIN SELECT 1; END; + +CREATE PROCEDURE [dbo].[spUpdateTaxCode6] ( @taxRates dtTaxRate READONLY, @taxRates1 dtTaxRate READONLY, @taxRates2 dtTaxRate READONLY, @taxCodeId BIGINT, @taxRates3 dtTaxRate READONLY, @Id BIGINT) AS BEGIN SELECT 1; END; + +CREATE PROCEDURE [dbo].[spUpdateTaxCode7] ( @taxRates dtTaxRate READONLY, @taxRates1 dtTaxRate READONLY, @taxRates2 dtTaxRate READONLY) AS BEGIN SELECT 1; END; diff --git a/test/JDBC/input/BABEL-4707-vu-verify.txt b/test/JDBC/input/BABEL-4707-vu-verify.txt new file mode 100644 index 0000000000..86c8497337 --- /dev/null +++ b/test/JDBC/input/BABEL-4707-vu-verify.txt @@ -0,0 +1,31 @@ +prepst#!#spUpdateTaxCode ?, ?, ?, ?, ?, ?, ?, ? #!#BIGINT|-|taxCodeId|-|236223201910#!#VARCHAR|-|code|-|"DIVIDEND"#!#BIGINT|-|countryId|-|42949673205#!#INT|-|taxRateTypeId|-|10#!#VARCHAR|-|description|-|"Test_desc"#!#VARCHAR|-|lastUpdatedBy|-|"TestProcess"#!#BIGINT|-|editorId|-|289#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv +prepst#!#exec#!#BIGINT|-|taxCodeId|-|236223201910#!#VARCHAR|-|code|-|"DIVIDEND"#!#BIGINT|-|countryId|-|42949673205#!#INT|-|taxRateTypeId|-|10#!#VARCHAR|-|description|-|"Test_desc"#!#VARCHAR|-|lastUpdatedBy|-|"TestProcess"#!#BIGINT|-|editorId|-|289#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv +prepst#!#exec#!#BIGINT|-|taxCodeId|-|236223201910#!#VARCHAR|-|code|-|"DIVIDEND"#!#BIGINT|-|countryId|-|42949673205#!#INT|-|taxRateTypeId|-|10#!#VARCHAR|-|description|-|"Test_desc"#!#VARCHAR|-|lastUpdatedBy|-|"TestProcess"#!#BIGINT|-|editorId|-|289#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv + +prepst#!#spUpdateTaxCode1 ?, ?, ?, ?, ?, ?, ?, ?, ? #!#BIGINT|-|taxCodeId|-|236223201910#!#VARCHAR|-|code|-|"DIVIDEND"#!#BIGINT|-|countryId|-|42949673205#!#INT|-|taxRateTypeId|-|10#!#VARCHAR|-|description|-|"Test_desc"#!#VARCHAR|-|lastUpdatedBy|-|"TestProcess"#!#BIGINT|-|editorId|-|289#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#BIGINT|-|id|-|42949673205 +prepst#!#exec#!#BIGINT|-|taxCodeId|-|236223201910#!#VARCHAR|-|code|-|"DIVIDEND"#!#BIGINT|-|countryId|-|42949673205#!#INT|-|taxRateTypeId|-|10#!#VARCHAR|-|description|-|"Test_desc"#!#VARCHAR|-|lastUpdatedBy|-|"TestProcess"#!#BIGINT|-|editorId|-|289#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#BIGINT|-|id|-|42949673205 +prepst#!#exec#!#BIGINT|-|taxCodeId|-|236223201910#!#VARCHAR|-|code|-|"DIVIDEND"#!#BIGINT|-|countryId|-|42949673205#!#INT|-|taxRateTypeId|-|10#!#VARCHAR|-|description|-|"Test_desc"#!#VARCHAR|-|lastUpdatedBy|-|"TestProcess"#!#BIGINT|-|editorId|-|289#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#BIGINT|-|id|-|42949673205 + +prepst#!#spUpdateTaxCode2 ?, ?, ?, ?, ?, ?, ?, ?, ?, ? #!#BIGINT|-|taxCodeId|-|236223201910#!#VARCHAR|-|code|-|"DIVIDEND"#!#BIGINT|-|countryId|-|42949673205#!#INT|-|taxRateTypeId|-|10#!#VARCHAR|-|description|-|"Test_desc"#!#VARCHAR|-|lastUpdatedBy|-|"TestProcess"#!#BIGINT|-|editorId|-|289#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#BIGINT|-|id|-|42949673205#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv +prepst#!#exec#!#BIGINT|-|taxCodeId|-|236223201910#!#VARCHAR|-|code|-|"DIVIDEND"#!#BIGINT|-|countryId|-|42949673205#!#INT|-|taxRateTypeId|-|10#!#VARCHAR|-|description|-|"Test_desc"#!#VARCHAR|-|lastUpdatedBy|-|"TestProcess"#!#BIGINT|-|editorId|-|289#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#BIGINT|-|id|-|42949673205#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv +prepst#!#exec#!#BIGINT|-|taxCodeId|-|236223201910#!#VARCHAR|-|code|-|"DIVIDEND"#!#BIGINT|-|countryId|-|42949673205#!#INT|-|taxRateTypeId|-|10#!#VARCHAR|-|description|-|"Test_desc"#!#VARCHAR|-|lastUpdatedBy|-|"TestProcess"#!#BIGINT|-|editorId|-|289#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#BIGINT|-|id|-|42949673205#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv + +prepst#!#spUpdateTaxCode3 ?, ?, ?, ?, ?, ?, ? #!#BIGINT|-|taxCodeId|-|236223201910#!#VARCHAR|-|code|-|"DIVIDEND"#!#BIGINT|-|countryId|-|42949673205#!#INT|-|taxRateTypeId|-|10#!#VARCHAR|-|description|-|"Test_desc"#!#VARCHAR|-|lastUpdatedBy|-|"TestProcess"#!#BIGINT|-|editorId|-|289 +prepst#!#exec#!#BIGINT|-|taxCodeId|-|236223201910#!#VARCHAR|-|code|-|"DIVIDEND"#!#BIGINT|-|countryId|-|42949673205#!#INT|-|taxRateTypeId|-|10#!#VARCHAR|-|description|-|"Test_desc"#!#VARCHAR|-|lastUpdatedBy|-|"TestProcess"#!#BIGINT|-|editorId|-|289 +prepst#!#exec#!#BIGINT|-|taxCodeId|-|236223201910#!#VARCHAR|-|code|-|"DIVIDEND"#!#BIGINT|-|countryId|-|42949673205#!#INT|-|taxRateTypeId|-|10#!#VARCHAR|-|description|-|"Test_desc"#!#VARCHAR|-|lastUpdatedBy|-|"TestProcess"#!#BIGINT|-|editorId|-|289 + +prepst#!#spUpdateTaxCode4 ?, ?, ?, ? #!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#BIGINT|-|taxCodeId|-|236223201910 +prepst#!#exec#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#BIGINT|-|taxCodeId|-|236223201910 +prepst#!#exec#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#BIGINT|-|taxCodeId|-|236223201910 + +prepst#!#spUpdateTaxCode5 ?, ?, ?, ?, ? #!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#BIGINT|-|taxCodeId|-|236223201910#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv +prepst#!#exec#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#BIGINT|-|taxCodeId|-|236223201910#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv +prepst#!#exec#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#BIGINT|-|taxCodeId|-|236223201910#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv + +prepst#!#spUpdateTaxCode6 ?, ?, ?, ?, ?, ? #!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#BIGINT|-|taxCodeId|-|236223201910#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#BIGINT|-|id|-|42949673205 +prepst#!#exec#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#BIGINT|-|taxCodeId|-|236223201910#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#BIGINT|-|id|-|42949673205 +prepst#!#exec#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#BIGINT|-|taxCodeId|-|236223201910#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#BIGINT|-|id|-|42949673205 + +prepst#!#spUpdateTaxCode7 ?, ?, ? #!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv +prepst#!#exec#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv +prepst#!#exec#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv#!#TVP|-|dtTaxRate|-|utils/tvp-dotnet.csv|-|utils/tvp-dotnet.csv diff --git a/test/JDBC/input/BABEL-SP_TABLES.sql b/test/JDBC/input/BABEL-SP_TABLES.sql index c3f172c4e7..35018fde2b 100644 --- a/test/JDBC/input/BABEL-SP_TABLES.sql +++ b/test/JDBC/input/BABEL-SP_TABLES.sql @@ -129,6 +129,31 @@ go exec [sys].sp_tables N't_sptables',N'dbo',NULL,N'''TABLE''',@fUsePattern=1; go +-- table_type list +exec [sys].sp_tables 't_sptable%','dbo',NULL,'''TABLE'',''VIEW''' +go +-- table_type list with unsupported type +exec [sys].sp_tables 't_sptable%','dbo',NULL,'''TABLE'',''VIEW'',''SYSTEM TABLE''' +go +-- table_type list without tables +exec [sys].sp_tables 't_sptable%','dbo',NULL,'''VIEW'',''SYSTEM TABLE''' +go +-- table_type list without views +exec [sys].sp_tables 't_sptable%','dbo',NULL,'''TABLE'',''SYSTEM TABLE''' +go +-- table_type list with double-escaping +exec [sys].sp_tables 't_sptable%','dbo',NULL,'''''''TABLE'''',''''VIEW'''',''''SYSTEM TABLE''''''' +go +-- table_type list with unbalanced quotes +exec [sys].sp_tables 't_sptable%','dbo',NULL,'''TABLE'''''',''''VIEW'',''SYSTEM TABLE''' +go +-- table_type list with spaces +exec [sys].sp_tables 't_sptable%','dbo',NULL,'''TABLE '','' VIEW'',''SYSTEM TABLE''' +go +-- table_type list with mixed case +exec [sys].sp_tables 't_sptable%','dbo',NULL,'''Table'',''View'',''System Table''' +go + drop view t_sptables5 go drop table t_sptables diff --git a/test/JDBC/upgrade/latest/schedule b/test/JDBC/upgrade/latest/schedule index 4f4ab8e8b1..ac85d0947b 100644 --- a/test/JDBC/upgrade/latest/schedule +++ b/test/JDBC/upgrade/latest/schedule @@ -425,4 +425,5 @@ sys_availability_groups sys_availability_replicas babel-4517 BABEL-4641 +BABEL-4707 BABEL_4817