From ff8651c4ecb33305c84bf545b000241d34a9ed2a Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 4 Feb 2008 16:39:55 -0200 Subject: 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. --- mysql-test/t/sp-error.test | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'mysql-test/t/sp-error.test') 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 @@ -2368,6 +2368,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 # -- cgit v1.2.1