Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Sharu Goel committed Jan 22, 2025
1 parent 0d61b62 commit 23aabca
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 39 deletions.
50 changes: 22 additions & 28 deletions test/JDBC/expected/BABEL-IDENTITY.out
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ Index Scan using test_id_index_pkey on test_id_index

~~START~~
text
Babelfish T-SQL Batch Parsing Time: 9.421 ms
Babelfish T-SQL Batch Parsing Time: 9.792 ms
~~END~~


Expand All @@ -778,7 +778,7 @@ Index Scan using test_id_index_pkey on test_id_index

~~START~~
text
Babelfish T-SQL Batch Parsing Time: 3.621 ms
Babelfish T-SQL Batch Parsing Time: 3.872 ms
~~END~~


Expand All @@ -793,7 +793,7 @@ Index Scan using test_id_index_pkey on test_id_index

~~START~~
text
Babelfish T-SQL Batch Parsing Time: 4.367 ms
Babelfish T-SQL Batch Parsing Time: 4.621 ms
~~END~~


Expand All @@ -808,7 +808,7 @@ Index Scan using test_id_index_pkey on test_id_index

~~START~~
text
Babelfish T-SQL Batch Parsing Time: 41.568 ms
Babelfish T-SQL Batch Parsing Time: 42.064 ms
~~END~~


Expand All @@ -825,7 +825,7 @@ Bitmap Heap Scan on test_id_index

~~START~~
text
Babelfish T-SQL Batch Parsing Time: 5.800 ms
Babelfish T-SQL Batch Parsing Time: 9.045 ms
~~END~~


Expand All @@ -840,7 +840,7 @@ Seq Scan on test_id_index

~~START~~
text
Babelfish T-SQL Batch Parsing Time: 1.250 ms
Babelfish T-SQL Batch Parsing Time: 2.038 ms
~~END~~


Expand All @@ -857,7 +857,7 @@ Bitmap Heap Scan on test_id_index

~~START~~
text
Babelfish T-SQL Batch Parsing Time: 5.660 ms
Babelfish T-SQL Batch Parsing Time: 9.868 ms
~~END~~


Expand All @@ -873,7 +873,7 @@ Index Scan using test_id_index_pkey on test_id_index

~~START~~
text
Babelfish T-SQL Batch Parsing Time: 0.332 ms
Babelfish T-SQL Batch Parsing Time: 0.577 ms
~~END~~


Expand All @@ -888,7 +888,7 @@ Seq Scan on test_id_index

~~START~~
text
Babelfish T-SQL Batch Parsing Time: 2.524 ms
Babelfish T-SQL Batch Parsing Time: 2.833 ms
~~END~~


Expand All @@ -903,7 +903,7 @@ Index Scan using test_id_index_tinyint_pkey on test_id_index_tinyint

~~START~~
text
Babelfish T-SQL Batch Parsing Time: 0.198 ms
Babelfish T-SQL Batch Parsing Time: 0.302 ms
~~END~~


Expand All @@ -918,7 +918,7 @@ Index Scan using test_id_index_smallint_pkey on test_id_index_smallint

~~START~~
text
Babelfish T-SQL Batch Parsing Time: 0.164 ms
Babelfish T-SQL Batch Parsing Time: 0.229 ms
~~END~~


Expand All @@ -933,7 +933,7 @@ Index Scan using test_id_index_bigint_pkey on test_id_index_bigint

~~START~~
text
Babelfish T-SQL Batch Parsing Time: 0.160 ms
Babelfish T-SQL Batch Parsing Time: 0.226 ms
~~END~~


Expand All @@ -948,7 +948,7 @@ Index Scan using test_id_index_numeric_pkey on test_id_index_numeric

~~START~~
text
Babelfish T-SQL Batch Parsing Time: 0.160 ms
Babelfish T-SQL Batch Parsing Time: 0.223 ms
~~END~~


Expand All @@ -974,7 +974,7 @@ Index Scan using test_numeric_index_no_id_pkey on test_numeric_index_no_id

~~START~~
text
Babelfish T-SQL Batch Parsing Time: 0.180 ms
Babelfish T-SQL Batch Parsing Time: 0.290 ms
~~END~~


Expand Down Expand Up @@ -1194,7 +1194,7 @@ Index Only Scan using babel_3384_test_pkey on babel_3384_test

~~START~~
text
Babelfish T-SQL Batch Parsing Time: 0.164 ms
Babelfish T-SQL Batch Parsing Time: 0.171 ms
~~END~~

select id from babel_3384_test WHERE id = @@IDENTITY
Expand All @@ -1208,7 +1208,7 @@ Index Only Scan using babel_3384_test_pkey on babel_3384_test

~~START~~
text
Babelfish T-SQL Batch Parsing Time: 0.151 ms
Babelfish T-SQL Batch Parsing Time: 0.164 ms
~~END~~


Expand Down Expand Up @@ -1536,35 +1536,29 @@ DROP DATABASE identity_insert_db
GO

-- We should ensure physical schema found corresponds to appropriate logical database
CREATE DATABASE ident_ins
CREATE DATABASE master_ident_ins
GO

CREATE DATABASE ident_ins_ident_ins
GO

USE ident_ins_ident_ins
USE master_ident_ins
GO

CREATE TABLE ident_t1 (a int identity, b int)
GO

-- Should not fail because relation exists
SET IDENTITY_INSERT ident_ins_ident_ins.dbo.ident_t1 ON
SET IDENTITY_INSERT master_ident_ins.dbo.ident_t1 ON
GO

-- Should fail because relation does not exist
SET IDENTITY_INSERT ident_ins.ident_ins_dbo.ident_t1 ON
SET IDENTITY_INSERT master.ident_ins_dbo.ident_t1 ON
GO
~~ERROR (Code: 33557097)~~

~~ERROR (Message: Cannot find the object "ident_ins.ident_ins_dbo.ident_t1" because it does not exist or you do not have permissions.)~~
~~ERROR (Message: Cannot find the object "master.ident_ins_dbo.ident_t1" because it does not exist or you do not have permissions.)~~


USE master
GO

DROP DATABASE ident_ins
GO

DROP DATABASE ident_ins_ident_ins
DROP DATABASE master_ident_ins
GO
16 changes: 5 additions & 11 deletions test/JDBC/input/BABEL-IDENTITY.mix
Original file line number Diff line number Diff line change
Expand Up @@ -775,31 +775,25 @@ DROP DATABASE identity_insert_db
GO

-- We should ensure physical schema found corresponds to appropriate logical database
CREATE DATABASE ident_ins
CREATE DATABASE master_ident_ins
GO

CREATE DATABASE ident_ins_ident_ins
GO

USE ident_ins_ident_ins
USE master_ident_ins
GO

CREATE TABLE ident_t1 (a int identity, b int)
GO

-- Should not fail because relation exists
SET IDENTITY_INSERT ident_ins_ident_ins.dbo.ident_t1 ON
SET IDENTITY_INSERT master_ident_ins.dbo.ident_t1 ON
GO

-- Should fail because relation does not exist
SET IDENTITY_INSERT ident_ins.ident_ins_dbo.ident_t1 ON
SET IDENTITY_INSERT master.ident_ins_dbo.ident_t1 ON
GO

USE master
GO

DROP DATABASE ident_ins
GO

DROP DATABASE ident_ins_ident_ins
DROP DATABASE master_ident_ins
GO

0 comments on commit 23aabca

Please sign in to comment.