Skip to content

Commit

Permalink
Merge 412a83a into e403bb8
Browse files Browse the repository at this point in the history
  • Loading branch information
timchang514 committed Jul 1, 2024
2 parents e403bb8 + 412a83a commit b7ffacc
Show file tree
Hide file tree
Showing 7 changed files with 144 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/JDBC/expected/BABEL-5071-vu-cleanup.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
drop trigger trig5071_1
go

drop table tab5071_1
go

DROP TRIGGER tab4992_1deleteOperation
GO

DROP TABLE tab4992_1
GO

DROP TABLE tab4992_2
GO

35 changes: 35 additions & 0 deletions test/JDBC/expected/BABEL-5071-vu-prepare.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
create table tab5071_1 (a int)
go

create trigger trig5071_1 on tab5071_1 for insert as begin
create table #temp_tst (a int)
insert #temp_tst select a*-1 from inserted;
select * from #temp_tst;
drop table #temp_tst
end
go

CREATE TABLE tab4992_1 (c1 int, c2 int)
GO

CREATE TABLE tab4992_2 (c1 int, c2 int)
GO

INSERT INTO tab4992_1 VALUES(1, 2)
GO
~~ROW COUNT: 1~~


CREATE TRIGGER tab4992_1deleteOperation on [dbo].[tab4992_1]
after delete AS
BEGIN
CREATE TABLE #tmp
(
c1 INT PRIMARY KEY,
c2 INT,
c3 VARCHAR(64) NOT NULL DEFAULT ''
)
INSERT INTO #tmp VALUES (1, 2, '')
INSERT INTO tab4992_2 SELECT c1,c2 FROM #tmp --> Crash
END
GO
31 changes: 31 additions & 0 deletions test/JDBC/expected/BABEL-5071-vu-verify.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

-- Test case found in 5071
insert tab5071_1 values (123)
go
~~ROW COUNT: 1~~

~~START~~
int
-123
~~END~~

~~ROW COUNT: 1~~



-- Test case found in 4992
DELETE FROM tab4992_1
GO
~~ROW COUNT: 1~~

~~ROW COUNT: 1~~

~~ROW COUNT: 1~~


SELECT * FROM tab4992_1
GO
~~START~~
int#!#int
~~END~~

15 changes: 15 additions & 0 deletions test/JDBC/input/BABEL-5071-vu-cleanup.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
drop trigger trig5071_1
go

drop table tab5071_1
go

DROP TRIGGER tab4992_1deleteOperation
GO

DROP TABLE tab4992_1
GO

DROP TABLE tab4992_2
GO

33 changes: 33 additions & 0 deletions test/JDBC/input/BABEL-5071-vu-prepare.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
create table tab5071_1 (a int)
go

create trigger trig5071_1 on tab5071_1 for insert as begin
create table #temp_tst (a int)
insert #temp_tst select a*-1 from inserted;
select * from #temp_tst;
drop table #temp_tst
end
go

CREATE TABLE tab4992_1 (c1 int, c2 int)
GO

CREATE TABLE tab4992_2 (c1 int, c2 int)
GO

INSERT INTO tab4992_1 VALUES(1, 2)
GO

CREATE TRIGGER tab4992_1deleteOperation on [dbo].[tab4992_1]
after delete AS
BEGIN
CREATE TABLE #tmp
(
c1 INT PRIMARY KEY,
c2 INT,
c3 VARCHAR(64) NOT NULL DEFAULT ''
)
INSERT INTO #tmp VALUES (1, 2, '')
INSERT INTO tab4992_2 SELECT c1,c2 FROM #tmp --> Crash
END
GO
12 changes: 12 additions & 0 deletions test/JDBC/input/BABEL-5071-vu-verify.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
-- Test case found in 5071

insert tab5071_1 values (123)
go

-- Test case found in 4992

DELETE FROM tab4992_1
GO

SELECT * FROM tab4992_1
GO
3 changes: 3 additions & 0 deletions test/JDBC/upgrade/latest/schedule
Original file line number Diff line number Diff line change
Expand Up @@ -540,3 +540,6 @@ babel_726
BABEL-3401
BABEL-3820
PARTITION
BABEL-5071-vu-prepare
BABEL-5071-vu-verify
BABEL-5071-vu-cleanup

0 comments on commit b7ffacc

Please sign in to comment.