summaryrefslogtreecommitdiff
path: root/mysql-test/t/sp-error.test
diff options
context:
space:
mode:
authorunknown <davi@mysql.com/endora.local>2008-02-04 16:39:55 -0200
committerunknown <davi@mysql.com/endora.local>2008-02-04 16:39:55 -0200
commitff8651c4ecb33305c84bf545b000241d34a9ed2a (patch)
treee12e1f4a1826cc8e642dfb1cf60b9845cd118495 /mysql-test/t/sp-error.test
parent7d5a858d2c600d4b16d721b0159790ab6482afe3 (diff)
downloadmariadb-git-ff8651c4ecb33305c84bf545b000241d34a9ed2a.tar.gz
Bug#21801 SQL exception handlers and warnings
The problem is that deprecated syntax warnings were not being suppressed when the stored routine is being parsed for the first execution. It's doesn't make sense to print out deprecated syntax warnings when the routine is being executed because this kind of warning only matters when the routine is being created. The solution is to suppress deprecated syntax warnings when parsing the stored routine for loading into the cache (might mean that the routine is being executed for the first time). mysql-test/r/sp-error.result: Add test case result for Bug#21801 mysql-test/t/sp-error.test: Add test case for Bug#21801 sql/sp.cc: Implement a internal error handler to catch deprecated syntax warnings when loading a stored procedure into the cache.
Diffstat (limited to 'mysql-test/t/sp-error.test')
-rw-r--r--mysql-test/t/sp-error.test18
1 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/t/sp-error.test b/mysql-test/t/sp-error.test
index 286722df65c..23bce3805af 100644
--- a/mysql-test/t/sp-error.test
+++ b/mysql-test/t/sp-error.test
@@ -2369,6 +2369,24 @@ end|
delimiter ;|
#
+# Bug#21801: SQL exception handlers and warnings
+#
+
+--disable_warnings
+drop procedure if exists p1;
+--enable_warnings
+delimiter |;
+create procedure p1()
+begin
+ create table t1 (a int) type=MyISAM;
+ drop table t1;
+end|
+delimiter ;|
+call p1();
+call p1();
+drop procedure p1;
+
+#
# BUG#NNNN: New bug synopsis
#
#--disable_warnings