Skip to content

Commit

Permalink
more tests
Browse files Browse the repository at this point in the history
Signed-off-by: Harsh Lunagariya <[email protected]>
  • Loading branch information
HarshLunagariya committed Dec 16, 2024
1 parent 168aeb0 commit b20fa79
Show file tree
Hide file tree
Showing 2 changed files with 339 additions and 0 deletions.
266 changes: 266 additions & 0 deletions test/JDBC/expected/BABEL-CROSS-DB-vu-verify.out
Original file line number Diff line number Diff line change
Expand Up @@ -919,6 +919,249 @@ int
~~END~~


-- system objects refferred via sys schema
-- for sys.databases
BEGIN; SELECT DISTINCT 1 FROM my_babel_cross_db_vu_prepare_db1.sys.databases; BEGIN; SELECT DISTINCT 1 FROM babel_cross_db_vu_prepare_master_t1; END; END;
GO
~~START~~
int
1
~~END~~

~~START~~
int
1
~~END~~


BEGIN; SELECT DISTINCT 1 FROM babel_cross_db_vu_prepare_master_t1; BEGIN SELECT DISTINCT 1 FROM my_babel_cross_db_vu_prepare_db1.sys.databases; END; END;
GO
~~START~~
int
1
~~END~~

~~START~~
int
1
~~END~~


BEGIN; SELECT DISTINCT 1 FROM my_babel_cross_db_vu_prepare_db1.sys.databases; END; BEGIN; SELECT DISTINCT 1 FROM babel_cross_db_vu_prepare_master_t1; END;
GO
~~START~~
int
1
~~END~~

~~START~~
int
1
~~END~~


BEGIN; SELECT DISTINCT 1 FROM babel_cross_db_vu_prepare_master_t1; END; BEGIN SELECT DISTINCT 1 FROM my_babel_cross_db_vu_prepare_db1.sys.databases; END;
GO
~~START~~
int
1
~~END~~

~~START~~
int
1
~~END~~


SELECT DISTINCT 1 FROM babel_cross_db_vu_prepare_master_t1;
SELECT DISTINCT 1 FROM my_babel_cross_db_vu_prepare_db1.sys.databases;
GO
~~START~~
int
1
~~END~~

~~START~~
int
1
~~END~~


SELECT DISTINCT 1 FROM my_babel_cross_db_vu_prepare_db1.sys.databases;
SELECT DISTINCT 1 FROM babel_cross_db_vu_prepare_master_t1;
GO
~~START~~
int
1
~~END~~

~~START~~
int
1
~~END~~


SELECT DISTINCT 1 FROM babel_cross_db_vu_prepare_master_t1;
SELECT DISTINCT 1 FROM my_babel_cross_db_vu_prepare_db1.sys.databases;
SELECT DISTINCT 1 FROM babel_cross_db_vu_prepare_master_t1;
GO
~~START~~
int
1
~~END~~

~~START~~
int
1
~~END~~

~~START~~
int
1
~~END~~


SELECT DISTINCT 1 FROM my_babel_cross_db_vu_prepare_db1.sys.databases;
SELECT DISTINCT 1 FROM babel_cross_db_vu_prepare_master_t1;
SELECT DISTINCT 1 FROM my_babel_cross_db_vu_prepare_db1.sys.databases;
GO
~~START~~
int
1
~~END~~

~~START~~
int
1
~~END~~

~~START~~
int
1
~~END~~


-- for sys.sysdatabases
BEGIN; SELECT DISTINCT 1 FROM my_babel_cross_db_vu_prepare_db1.sys.sysdatabases; BEGIN; SELECT DISTINCT 1 FROM babel_cross_db_vu_prepare_master_t1; END; END;
GO
~~START~~
int
1
~~END~~

~~START~~
int
1
~~END~~


BEGIN; SELECT DISTINCT 1 FROM babel_cross_db_vu_prepare_master_t1; BEGIN SELECT DISTINCT 1 FROM my_babel_cross_db_vu_prepare_db1.sys.sysdatabases; END; END;
GO
~~START~~
int
1
~~END~~

~~START~~
int
1
~~END~~


BEGIN; SELECT DISTINCT 1 FROM my_babel_cross_db_vu_prepare_db1.sys.sysdatabases; END; BEGIN; SELECT DISTINCT 1 FROM babel_cross_db_vu_prepare_master_t1; END;
GO
~~START~~
int
1
~~END~~

~~START~~
int
1
~~END~~


BEGIN; SELECT DISTINCT 1 FROM babel_cross_db_vu_prepare_master_t1; END; BEGIN SELECT DISTINCT 1 FROM my_babel_cross_db_vu_prepare_db1.sys.sysdatabases; END;
GO
~~START~~
int
1
~~END~~

~~START~~
int
1
~~END~~


SELECT DISTINCT 1 FROM babel_cross_db_vu_prepare_master_t1;
SELECT DISTINCT 1 FROM my_babel_cross_db_vu_prepare_db1.sys.sysdatabases;
GO
~~START~~
int
1
~~END~~

~~START~~
int
1
~~END~~


SELECT DISTINCT 1 FROM my_babel_cross_db_vu_prepare_db1.sys.sysdatabases;
SELECT DISTINCT 1 FROM babel_cross_db_vu_prepare_master_t1;
GO
~~START~~
int
1
~~END~~

~~START~~
int
1
~~END~~


SELECT DISTINCT 1 FROM babel_cross_db_vu_prepare_master_t1;
SELECT DISTINCT 1 FROM my_babel_cross_db_vu_prepare_db1.sys.sysdatabases;
SELECT DISTINCT 1 FROM babel_cross_db_vu_prepare_master_t1;
GO
~~START~~
int
1
~~END~~

~~START~~
int
1
~~END~~

~~START~~
int
1
~~END~~


SELECT DISTINCT 1 FROM my_babel_cross_db_vu_prepare_db1.sys.sysdatabases;
SELECT DISTINCT 1 FROM babel_cross_db_vu_prepare_master_t1;
SELECT DISTINCT 1 FROM my_babel_cross_db_vu_prepare_db1.sys.sysdatabases;
GO
~~START~~
int
1
~~END~~

~~START~~
int
1
~~END~~

~~START~~
int
1
~~END~~


-- Batches having user created objects
BEGIN; SELECT DISTINCT 1 FROM my_babel_cross_db_vu_prepare_db1.dbo.babel_cross_db_vu_prepare_db1_t1; BEGIN; SELECT DISTINCT 1 FROM babel_cross_db_vu_prepare_master_t1; END; END;
GO
Expand Down Expand Up @@ -1159,6 +1402,29 @@ int
DROP TABLE babel_cross_db_vu_verify_tempt;
GO

-- temp table creation
BEGIN; SELECT DISTINCT 1 FROM my_babel_cross_db_vu_prepare_db1.dbo.sysdatabases; BEGIN CREATE TABLE #babel_cross_db_vu_verify_tempt(a int); SELECT DISTINCT 1 FROM #babel_cross_db_vu_verify_tempt; END; END;
GO
~~START~~
int
1
~~END~~

~~START~~
int
~~END~~


SELECT DISTINCT 1 FROM #babel_cross_db_vu_verify_tempt;
GO
~~START~~
int
~~END~~


DROP TABLE #babel_cross_db_vu_verify_tempt;
GO

-- tsql
USE master
GO
73 changes: 73 additions & 0 deletions test/JDBC/input/ownership/BABEL-CROSS-DB-vu-verify.mix
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,69 @@ SELECT DISTINCT 1 FROM babel_cross_db_vu_prepare_master_t1;
SELECT DISTINCT 1 FROM my_babel_cross_db_vu_prepare_db1.dbo.sysdatabases;
GO

-- system objects refferred via sys schema
-- for sys.databases
BEGIN; SELECT DISTINCT 1 FROM my_babel_cross_db_vu_prepare_db1.sys.databases; BEGIN; SELECT DISTINCT 1 FROM babel_cross_db_vu_prepare_master_t1; END; END;
GO

BEGIN; SELECT DISTINCT 1 FROM babel_cross_db_vu_prepare_master_t1; BEGIN SELECT DISTINCT 1 FROM my_babel_cross_db_vu_prepare_db1.sys.databases; END; END;
GO

BEGIN; SELECT DISTINCT 1 FROM my_babel_cross_db_vu_prepare_db1.sys.databases; END; BEGIN; SELECT DISTINCT 1 FROM babel_cross_db_vu_prepare_master_t1; END;
GO

BEGIN; SELECT DISTINCT 1 FROM babel_cross_db_vu_prepare_master_t1; END; BEGIN SELECT DISTINCT 1 FROM my_babel_cross_db_vu_prepare_db1.sys.databases; END;
GO

SELECT DISTINCT 1 FROM babel_cross_db_vu_prepare_master_t1;
SELECT DISTINCT 1 FROM my_babel_cross_db_vu_prepare_db1.sys.databases;
GO

SELECT DISTINCT 1 FROM my_babel_cross_db_vu_prepare_db1.sys.databases;
SELECT DISTINCT 1 FROM babel_cross_db_vu_prepare_master_t1;
GO

SELECT DISTINCT 1 FROM babel_cross_db_vu_prepare_master_t1;
SELECT DISTINCT 1 FROM my_babel_cross_db_vu_prepare_db1.sys.databases;
SELECT DISTINCT 1 FROM babel_cross_db_vu_prepare_master_t1;
GO

SELECT DISTINCT 1 FROM my_babel_cross_db_vu_prepare_db1.sys.databases;
SELECT DISTINCT 1 FROM babel_cross_db_vu_prepare_master_t1;
SELECT DISTINCT 1 FROM my_babel_cross_db_vu_prepare_db1.sys.databases;
GO

-- for sys.sysdatabases
BEGIN; SELECT DISTINCT 1 FROM my_babel_cross_db_vu_prepare_db1.sys.sysdatabases; BEGIN; SELECT DISTINCT 1 FROM babel_cross_db_vu_prepare_master_t1; END; END;
GO

BEGIN; SELECT DISTINCT 1 FROM babel_cross_db_vu_prepare_master_t1; BEGIN SELECT DISTINCT 1 FROM my_babel_cross_db_vu_prepare_db1.sys.sysdatabases; END; END;
GO

BEGIN; SELECT DISTINCT 1 FROM my_babel_cross_db_vu_prepare_db1.sys.sysdatabases; END; BEGIN; SELECT DISTINCT 1 FROM babel_cross_db_vu_prepare_master_t1; END;
GO

BEGIN; SELECT DISTINCT 1 FROM babel_cross_db_vu_prepare_master_t1; END; BEGIN SELECT DISTINCT 1 FROM my_babel_cross_db_vu_prepare_db1.sys.sysdatabases; END;
GO

SELECT DISTINCT 1 FROM babel_cross_db_vu_prepare_master_t1;
SELECT DISTINCT 1 FROM my_babel_cross_db_vu_prepare_db1.sys.sysdatabases;
GO

SELECT DISTINCT 1 FROM my_babel_cross_db_vu_prepare_db1.sys.sysdatabases;
SELECT DISTINCT 1 FROM babel_cross_db_vu_prepare_master_t1;
GO

SELECT DISTINCT 1 FROM babel_cross_db_vu_prepare_master_t1;
SELECT DISTINCT 1 FROM my_babel_cross_db_vu_prepare_db1.sys.sysdatabases;
SELECT DISTINCT 1 FROM babel_cross_db_vu_prepare_master_t1;
GO

SELECT DISTINCT 1 FROM my_babel_cross_db_vu_prepare_db1.sys.sysdatabases;
SELECT DISTINCT 1 FROM babel_cross_db_vu_prepare_master_t1;
SELECT DISTINCT 1 FROM my_babel_cross_db_vu_prepare_db1.sys.sysdatabases;
GO

-- Batches having user created objects
BEGIN; SELECT DISTINCT 1 FROM my_babel_cross_db_vu_prepare_db1.dbo.babel_cross_db_vu_prepare_db1_t1; BEGIN; SELECT DISTINCT 1 FROM babel_cross_db_vu_prepare_master_t1; END; END;
GO
Expand Down Expand Up @@ -539,6 +602,16 @@ GO
DROP TABLE babel_cross_db_vu_verify_tempt;
GO

-- temp table creation
BEGIN; SELECT DISTINCT 1 FROM my_babel_cross_db_vu_prepare_db1.dbo.sysdatabases; BEGIN CREATE TABLE #babel_cross_db_vu_verify_tempt(a int); SELECT DISTINCT 1 FROM #babel_cross_db_vu_verify_tempt; END; END;
GO

SELECT DISTINCT 1 FROM #babel_cross_db_vu_verify_tempt;
GO

DROP TABLE #babel_cross_db_vu_verify_tempt;
GO

-- tsql
USE master
GO

0 comments on commit b20fa79

Please sign in to comment.