Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
82c1c023
Commit
82c1c023
authored
Mar 06, 2007
by
malff/marcsql@weblab.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Manual merge
parent
9f0b0df9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
111 additions
and
0 deletions
+111
-0
mysql-test/r/trigger.result
mysql-test/r/trigger.result
+37
-0
mysql-test/t/trigger.test
mysql-test/t/trigger.test
+74
-0
No files found.
mysql-test/r/trigger.result
View file @
82c1c023
...
@@ -1335,4 +1335,41 @@ SELECT fubar_id FROM t2;
...
@@ -1335,4 +1335,41 @@ SELECT fubar_id FROM t2;
fubar_id
fubar_id
1
1
DROP TABLE t1,t2;
DROP TABLE t1,t2;
DROP TABLE IF EXISTS bug21825_A;
DROP TABLE IF EXISTS bug21825_B;
CREATE TABLE bug21825_A (id int(10));
CREATE TABLE bug21825_B (id int(10));
CREATE TRIGGER trgA AFTER INSERT ON bug21825_A
FOR EACH ROW
BEGIN
INSERT INTO bug21825_B (id) values (1);
END//
INSERT INTO bug21825_A (id) VALUES (10);
INSERT INTO bug21825_A (id) VALUES (20);
DROP TABLE bug21825_B;
DELETE FROM bug21825_A WHERE id = 20;
DROP TABLE bug21825_A;
DROP TABLE IF EXISTS bug22580_t1;
DROP PROCEDURE IF EXISTS bug22580_proc_1;
DROP PROCEDURE IF EXISTS bug22580_proc_2;
CREATE TABLE bug22580_t1 (a INT, b INT);
CREATE PROCEDURE bug22580_proc_2()
BEGIN
DROP TABLE IF EXISTS bug22580_tmp;
CREATE TEMPORARY TABLE bug22580_tmp (a INT);
DROP TABLE bug22580_tmp;
END||
CREATE PROCEDURE bug22580_proc_1()
BEGIN
CALL bug22580_proc_2();
END||
CREATE TRIGGER t1bu BEFORE UPDATE ON bug22580_t1
FOR EACH ROW
BEGIN
CALL bug22580_proc_1();
END||
INSERT INTO bug22580_t1 VALUES (1,1);
DROP TABLE bug22580_t1;
DROP PROCEDURE bug22580_proc_1;
DROP PROCEDURE bug22580_proc_2;
End of 5.0 tests
End of 5.0 tests
mysql-test/t/trigger.test
View file @
82c1c023
...
@@ -1625,4 +1625,78 @@ SELECT fubar_id FROM t2;
...
@@ -1625,4 +1625,78 @@ SELECT fubar_id FROM t2;
DROP
TABLE
t1
,
t2
;
DROP
TABLE
t1
,
t2
;
#
# Bug#21285 (Incorrect message error deleting records in a table with a
# trigger for inserting)
#
--
disable_warnings
DROP
TABLE
IF
EXISTS
bug21825_A
;
DROP
TABLE
IF
EXISTS
bug21825_B
;
--
enable_warnings
CREATE
TABLE
bug21825_A
(
id
int
(
10
));
CREATE
TABLE
bug21825_B
(
id
int
(
10
));
delimiter
//;
CREATE
TRIGGER
trgA
AFTER
INSERT
ON
bug21825_A
FOR
EACH
ROW
BEGIN
INSERT
INTO
bug21825_B
(
id
)
values
(
1
);
END
//
delimiter
;
//
INSERT
INTO
bug21825_A
(
id
)
VALUES
(
10
);
INSERT
INTO
bug21825_A
(
id
)
VALUES
(
20
);
DROP
TABLE
bug21825_B
;
# Must pass, the missing table in the insert trigger should not matter.
DELETE
FROM
bug21825_A
WHERE
id
=
20
;
DROP
TABLE
bug21825_A
;
#
# Bug#22580 (DROP TABLE in nested stored procedure causes strange dependancy
# error)
#
--
disable_warnings
DROP
TABLE
IF
EXISTS
bug22580_t1
;
DROP
PROCEDURE
IF
EXISTS
bug22580_proc_1
;
DROP
PROCEDURE
IF
EXISTS
bug22580_proc_2
;
--
enable_warnings
CREATE
TABLE
bug22580_t1
(
a
INT
,
b
INT
);
DELIMITER
||
;
CREATE
PROCEDURE
bug22580_proc_2
()
BEGIN
DROP
TABLE
IF
EXISTS
bug22580_tmp
;
CREATE
TEMPORARY
TABLE
bug22580_tmp
(
a
INT
);
DROP
TABLE
bug22580_tmp
;
END
||
CREATE
PROCEDURE
bug22580_proc_1
()
BEGIN
CALL
bug22580_proc_2
();
END
||
CREATE
TRIGGER
t1bu
BEFORE
UPDATE
ON
bug22580_t1
FOR
EACH
ROW
BEGIN
CALL
bug22580_proc_1
();
END
||
DELIMITER
;
||
# Must pass, the actions of the update trigger should not matter
INSERT
INTO
bug22580_t1
VALUES
(
1
,
1
);
DROP
TABLE
bug22580_t1
;
DROP
PROCEDURE
bug22580_proc_1
;
DROP
PROCEDURE
bug22580_proc_2
;
--
echo
End
of
5.0
tests
--
echo
End
of
5.0
tests
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment