summaryrefslogtreecommitdiff
path: root/mysql-test/t/sp-bugs.test
diff options
context:
space:
mode:
authorAlexander Nozdrin <alik@sun.com>2010-03-02 17:34:50 +0300
committerAlexander Nozdrin <alik@sun.com>2010-03-02 17:34:50 +0300
commitd3755291caa9c93f7aca42c09db9aeb1df0ef84f (patch)
treeb41651212156dfd684f8a54791bdf3b7cfc85c25 /mysql-test/t/sp-bugs.test
parentb184d466acee921247541fd0a42eb62d23b07dec (diff)
parent64b91b2698603d24e8ffde46fc9421a6d2442a35 (diff)
downloadmariadb-git-d3755291caa9c93f7aca42c09db9aeb1df0ef84f.tar.gz
Manual merge from mysql-next-mr.
Conflicts: - sql/sql_base.cc
Diffstat (limited to 'mysql-test/t/sp-bugs.test')
-rw-r--r--mysql-test/t/sp-bugs.test43
1 files changed, 43 insertions, 0 deletions
diff --git a/mysql-test/t/sp-bugs.test b/mysql-test/t/sp-bugs.test
index 7b94e65a5e9..8aa0791e265 100644
--- a/mysql-test/t/sp-bugs.test
+++ b/mysql-test/t/sp-bugs.test
@@ -57,5 +57,48 @@ SELECT f2 ();
DROP SCHEMA testdb;
+USE test;
+
+--echo #
+--echo # Bug#50423: Crash on second call of a procedure dropping a trigger
+--echo #
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+DROP TRIGGER IF EXISTS tr1;
+DROP PROCEDURE IF EXISTS p1;
+--enable_warnings
+
+CREATE TABLE t1 (f1 INTEGER);
+CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET @aux = 1;
+CREATE PROCEDURE p1 () DROP TRIGGER tr1;
+
+CALL p1 ();
+--error ER_TRG_DOES_NOT_EXIST
+CALL p1 ();
+
+DROP TABLE t1;
+DROP PROCEDURE p1;
+
+--echo #
+--echo # Bug#50423: Crash on second call of a procedure dropping a trigger
+--echo #
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+DROP TRIGGER IF EXISTS tr1;
+DROP PROCEDURE IF EXISTS p1;
+--enable_warnings
+
+CREATE TABLE t1 (f1 INTEGER);
+CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET @aux = 1;
+CREATE PROCEDURE p1 () DROP TRIGGER tr1;
+
+CALL p1 ();
+--error ER_TRG_DOES_NOT_EXIST
+CALL p1 ();
+
+DROP TABLE t1;
+DROP PROCEDURE p1;
--echo End of 5.1 tests