summaryrefslogtreecommitdiff
path: root/mysql-test/t/sp.test
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2012-03-28 01:04:46 +0200
committerSergei Golubchik <sergii@pisem.net>2012-03-28 01:04:46 +0200
commit20e706689df1eb87c696304797e9d6184c0a75bb (patch)
treeff3eab8fa3e060b34687c6e9819cb559ac67d5c5 /mysql-test/t/sp.test
parent3d0775e9af2fcf3fe92b7f19e299ea23068eca1e (diff)
parentbfaebe3f5e4b917c4498e234bad7a9d45d07ca62 (diff)
downloadmariadb-git-20e706689df1eb87c696304797e9d6184c0a75bb.tar.gz
mysql-5.5.22 merge
mysql-test/suite/innodb/t/group_commit_crash.test: remove autoincrement to avoid rbr being used for insert ... select mysql-test/suite/innodb/t/group_commit_crash_no_optimize_thread.test: remove autoincrement to avoid rbr being used for insert ... select mysys/my_addr_resolve.c: a pointer to a buffer is returned to the caller -> the buffer cannot be on the stack mysys/stacktrace.c: my_vsnprintf() is ok here, in 5.5
Diffstat (limited to 'mysql-test/t/sp.test')
-rw-r--r--mysql-test/t/sp.test29
1 files changed, 29 insertions, 0 deletions
diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test
index cafa7f0a551..02182dbf0c6 100644
--- a/mysql-test/t/sp.test
+++ b/mysql-test/t/sp.test
@@ -9040,3 +9040,32 @@ DROP PROCEDURE p2;
DROP TABLE t1;
--echo # End of 5.5 test
+
+
+--echo #
+--echo # Bug#12663165 SP DEAD CODE REMOVAL DOESN'T UNDERSTAND CONTINUE HANDLERS
+--echo #
+
+--disable_warnings
+DROP FUNCTION IF EXISTS f1;
+--enable_warnings
+
+delimiter $;
+CREATE FUNCTION f1() RETURNS INT
+BEGIN
+ DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
+ BEGIN
+ DECLARE CONTINUE HANDLER FOR SQLEXCEPTION RETURN f1();
+ BEGIN
+ DECLARE CONTINUE HANDLER FOR SQLEXCEPTION RETURN f1();
+ RETURN f1();
+ END;
+ END;
+RETURN 1;
+END $
+delimiter ;$
+
+# This used to cause an assertion.
+SELECT f1();
+
+DROP FUNCTION f1;