Skip to content

Commit

Permalink
add upgrade tests
Browse files Browse the repository at this point in the history
Signed-off-by: Sandeep Kumawat <[email protected]>
  • Loading branch information
Sandeep Kumawat committed Jan 1, 2024
1 parent b82099a commit 7763353
Show file tree
Hide file tree
Showing 12 changed files with 444 additions and 7 deletions.
50 changes: 50 additions & 0 deletions test/JDBC/expected/BABEL-4529-before-15_6-or-14_11-vu-cleanup.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
DROP VIEW IF EXISTS babel_4529_stats
GO

DROP VIEW IF EXISTS babel_4529_dm_exec_connections
GO

DROP VIEW IF EXISTS babel_4529_syscolumns
GO

DROP VIEW IF EXISTS babel_4529_system_objects
GO

DROP VIEW IF EXISTS babel_4529_xml_indexes
GO

DROP VIEW IF EXISTS babel_4529_sysforeignkeys
GO

DROP VIEW IF EXISTS babel_4529_data_spaces
GO

DROP VIEW IF EXISTS babel_4529_sysprocesses
GO

DROP VIEW IF EXISTS babel_4529_key_constraints
GO

DROP VIEW IF EXISTS babel_4529_foreign_keys
GO

DROP VIEW IF EXISTS babel_4529_sysviews
GO

DROP VIEW IF EXISTS babel_4529_systables
GO

DROP VIEW IF EXISTS babel_4529_default_constraints
GO

DROP VIEW IF EXISTS babel_4529_check_constraints
GO

DROP VIEW IF EXISTS babel_4529_types
GO

DROP VIEW IF EXISTS babel_4529_sp_sproc_columns_view
GO

DROP VIEW IF EXISTS babel_4529_systypes
GO
84 changes: 84 additions & 0 deletions test/JDBC/expected/BABEL-4529-before-15_6-or-14_11-vu-prepare.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
CREATE VIEW babel_4529_stats
AS
SELECT stats_generation_method_desc FROM sys.stats
GO

CREATE VIEW babel_4529_dm_exec_connections
AS
SELECT local_net_address, client_net_address, endpoint_id FROM sys.dm_exec_connections where local_net_address = 'test_address_4529';
GO

CREATE VIEW babel_4529_syscolumns
AS
SELECT printfmt FROM sys.syscolumns where name = 'test_name_4529'
GO

CREATE VIEW babel_4529_system_objects
AS
SELECT * FROM sys.system_objects where name='test_key_constraints'
GO

CREATE VIEW babel_4529_xml_indexes
AS
SELECT secondary_type FROM sys.xml_indexes
GO

CREATE VIEW babel_4529_sysforeignkeys
AS
SELECT * FROM sys.sysforeignkeys where fkeyid IS NULL
GO

CREATE VIEW babel_4529_data_spaces
AS
SELECT type FROM sys.data_spaces where type='FG'
GO

CREATE VIEW babel_4529_sysprocesses
AS
SELECT * FROM sys.sysprocesses WHERE loginname = 'test_name_4529'
GO

CREATE VIEW babel_4529_key_constraints
AS
SELECT type FROM sys.key_constraints where parent_object_id IS NULL
GO

CREATE VIEW babel_4529_foreign_keys
AS
SELECT type FROM sys.foreign_keys where name = 'test_name_4529'
GO

CREATE VIEW babel_4529_sysviews
AS
SELECT name, type, type_desc, create_date, modify_date, is_ms_shipped, is_published, is_schema_published, with_check_option, is_date_correlation_view, is_tracked_by_cdc, object_id, schema_id FROM sys.views where name = 'test_name_4529'
GO

CREATE VIEW babel_4529_systables
AS
SELECT type FROM sys.tables where name = 'test_name_4529'
GO

CREATE VIEW babel_4529_default_constraints
AS
SELECT type FROM sys.default_constraints where name = 'test_name_4529'
GO

CREATE VIEW babel_4529_check_constraints
AS
SELECT type FROM sys.check_constraints where name = 'test_name_4529'
GO

CREATE VIEW babel_4529_types
AS
SELECT name, collation_name, precision, scale, is_user_defined, is_assembly_type, is_table_type, default_object_id, rule_object_id, system_type_id, user_type_id, schema_id FROM sys.types where name = 'test_name_4529'
GO

CREATE VIEW babel_4529_sp_sproc_columns_view
AS
SELECT precision, scale FROM sys.sp_sproc_columns_view where PROCEDURE_QUALIFIER = 'test_name_4529'
GO

CREATE VIEW babel_4529_systypes
AS
SELECT prec FROM sys.systypes where name = 'test_name_4529'
GO
119 changes: 119 additions & 0 deletions test/JDBC/expected/BABEL-4529-before-15_6-or-14_11-vu-verify.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
SELECT * FROM babel_4529_stats
GO
~~START~~
varchar
~~END~~


SELECT * FROM babel_4529_dm_exec_connections
GO
~~START~~
varchar#!#varchar#!#int
~~END~~


SELECT * FROM babel_4529_syscolumns
GO
~~START~~
varchar
~~END~~


SELECT * FROM babel_4529_system_objects
GO
~~START~~
varchar#!#int#!#int#!#int#!#int#!#char#!#nvarchar#!#datetime#!#datetime#!#bit#!#bit#!#bit#!#int#!#varchar#!#int#!#varchar
~~END~~


SELECT * FROM babel_4529_xml_indexes
GO
~~START~~
char
~~END~~


SELECT * FROM babel_4529_sysforeignkeys
GO
~~START~~
varchar#!#int#!#int#!#int#!#smallint#!#smallint#!#smallint
~~END~~


SELECT * FROM babel_4529_data_spaces
GO
~~START~~
char
FG
~~END~~


SELECT * FROM babel_4529_sysprocesses
GO
~~START~~
int#!#int#!#int#!#varbinary#!#int#!#text#!#text#!#int#!#int#!#int#!#int#!#int#!#varchar#!#varchar#!#int#!#int#!#text#!#varbinary#!#nchar#!#text#!#varchar#!#text#!#varchar#!#varchar#!#varchar#!#varchar#!#varchar#!#varbinary#!#varbinary#!#int#!#int#!#int
~~END~~


SELECT * FROM babel_4529_key_constraints
GO
~~START~~
char
~~END~~


SELECT * FROM babel_4529_foreign_keys
GO
~~START~~
char
~~END~~


SELECT * FROM babel_4529_sysviews
GO
~~START~~
varchar#!#varchar#!#varchar#!#datetime#!#datetime#!#int#!#int#!#int#!#int#!#int#!#int#!#int#!#int
~~END~~


SELECT * FROM babel_4529_systables
GO
~~START~~
char
~~END~~


SELECT * FROM babel_4529_default_constraints
GO
~~START~~
char
~~END~~


SELECT * FROM babel_4529_check_constraints
GO
~~START~~
char
~~END~~


SELECT * FROM babel_4529_types
GO
~~START~~
text#!#varchar#!#int#!#int#!#int#!#int#!#int#!#int#!#int#!#int#!#int#!#int
~~END~~


SELECT * FROM babel_4529_sp_sproc_columns_view
GO
~~START~~
int#!#smallint
~~END~~


SELECT * FROM babel_4529_systypes
GO
~~START~~
int
~~END~~

2 changes: 1 addition & 1 deletion test/JDBC/expected/BABEL-4529-vu-prepare.out
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ GO

CREATE VIEW babel_4529_dm_exec_connections
AS
SELECT local_net_address, client_net_address, endpoint_id FROM sys.dm_exec_connections where session_id IS NULL;
SELECT local_net_address, client_net_address, endpoint_id FROM sys.dm_exec_connections where local_net_address = 'test_address_4529';
GO

CREATE VIEW babel_4529_syscolumns
Expand Down
50 changes: 50 additions & 0 deletions test/JDBC/input/BABEL-4529-before-15_6-or-14_11-vu-cleanup.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
DROP VIEW IF EXISTS babel_4529_stats
GO

DROP VIEW IF EXISTS babel_4529_dm_exec_connections
GO

DROP VIEW IF EXISTS babel_4529_syscolumns
GO

DROP VIEW IF EXISTS babel_4529_system_objects
GO

DROP VIEW IF EXISTS babel_4529_xml_indexes
GO

DROP VIEW IF EXISTS babel_4529_sysforeignkeys
GO

DROP VIEW IF EXISTS babel_4529_data_spaces
GO

DROP VIEW IF EXISTS babel_4529_sysprocesses
GO

DROP VIEW IF EXISTS babel_4529_key_constraints
GO

DROP VIEW IF EXISTS babel_4529_foreign_keys
GO

DROP VIEW IF EXISTS babel_4529_sysviews
GO

DROP VIEW IF EXISTS babel_4529_systables
GO

DROP VIEW IF EXISTS babel_4529_default_constraints
GO

DROP VIEW IF EXISTS babel_4529_check_constraints
GO

DROP VIEW IF EXISTS babel_4529_types
GO

DROP VIEW IF EXISTS babel_4529_sp_sproc_columns_view
GO

DROP VIEW IF EXISTS babel_4529_systypes
GO
Loading

0 comments on commit 7763353

Please sign in to comment.