Skip to content

Commit

Permalink
Create new connection for every test batch
Browse files Browse the repository at this point in the history
  • Loading branch information
roshan0708 committed Jan 30, 2025
1 parent 1eb5e85 commit 18d7d88
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/JDBC/input/fk_trigger_temp-vu-verify.mix
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
-- tsql user=jdbc_user password=1
-- tsql user=jdbc_user password=12345678
-- Case 1: Original repro issue
INSERT INTO [dbo].[orderitem] (fkorder, screatedby) VALUES(25001000, 'test');
GO

INSERT INTO [dbo].[orderitem] (fkorder, screatedby) VALUES(25001000, 'test');
GO

-- tsql user=jdbc_user password=12345678
-- Case 2: Trigger Functionality with Table Variables
CREATE TRIGGER tr_Child_Insert ON Child AFTER INSERT AS
BEGIN
Expand All @@ -32,6 +33,7 @@ GO
INSERT INTO Child VALUES (2, 999); -- Should fail
GO

-- tsql user=jdbc_user password=12345678
-- Case 3: Trigger Functionality with Temporary Tables
CREATE TRIGGER tr_Child_Update ON Child AFTER UPDATE AS
BEGIN
Expand Down Expand Up @@ -63,6 +65,7 @@ GO
UPDATE Child SET ParentID = 999 WHERE ID = 1; -- Should fail
GO

-- tsql user=jdbc_user password=12345678
-- Case 4: Complex Trigger Scenarios
CREATE TRIGGER tr_Parent_Insert ON Parent AFTER INSERT AS
BEGIN
Expand All @@ -89,6 +92,7 @@ GO
INSERT INTO Parent VALUES (4, 999); -- Should fail
GO

-- tsql user=jdbc_user password=12345678
-- Case 5: NULL test
CREATE TRIGGER tr_Child_NullHandling ON Child AFTER INSERT AS
BEGIN
Expand All @@ -114,6 +118,7 @@ GO
INSERT INTO Child VALUES (1000, NULL); -- Should fail
GO

-- tsql user=jdbc_user password=12345678
-- Case 6: Nesting test
CREATE TRIGGER tr_Level3_Insert ON Level3 AFTER INSERT AS
BEGIN
Expand All @@ -140,6 +145,7 @@ GO
INSERT INTO Level3 VALUES (2, 999); -- Should fail
GO

-- tsql user=jdbc_user password=12345678
-- Case 7: Special Characters support test
CREATE TRIGGER tr_SpecialChar_Insert ON [Child#Table] AFTER INSERT AS
BEGIN
Expand Down

0 comments on commit 18d7d88

Please sign in to comment.