summaryrefslogtreecommitdiff
path: root/mysql-test/t/sp-error.test
diff options
context:
space:
mode:
authorunknown <malff@lambda.hsd1.co.comcast.net.>2008-03-21 12:08:04 -0600
committerunknown <malff@lambda.hsd1.co.comcast.net.>2008-03-21 12:08:04 -0600
commit194e43ee68e9f1acb9d1ef380894c4fc4c27f22e (patch)
tree555f43e3e764f45a661e34954e97346de3b0aabc /mysql-test/t/sp-error.test
parent6c61454bcd01aaa59bfb991824f96fd3358b05ad (diff)
downloadmariadb-git-194e43ee68e9f1acb9d1ef380894c4fc4c27f22e.tar.gz
Bug#8759 (Stored Procedures: SQLSTATE '00000' should be illegal)
Fixed the parser to reject SQLSTATE '00000', since '00000' is the successful completion condition, and can not be caught by an exception handler in SQL. mysql-test/r/sp-error.result: Bug#8759 (Stored Procedures: SQLSTATE '00000' should be illegal) mysql-test/t/sp-error.test: Bug#8759 (Stored Procedures: SQLSTATE '00000' should be illegal) sql/sp_pcontext.cc: Bug#8759 (Stored Procedures: SQLSTATE '00000' should be illegal)
Diffstat (limited to 'mysql-test/t/sp-error.test')
-rw-r--r--mysql-test/t/sp-error.test26
1 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/t/sp-error.test b/mysql-test/t/sp-error.test
index 23bce3805af..6896a1ab832 100644
--- a/mysql-test/t/sp-error.test
+++ b/mysql-test/t/sp-error.test
@@ -2387,6 +2387,32 @@ call p1();
drop procedure p1;
#
+# Bug#8759 (Stored Procedures: SQLSTATE '00000' should be illegal)
+#
+
+--disable_warnings
+drop procedure if exists proc_8759;
+--enable_warnings
+
+delimiter $$;
+
+--error ER_SP_BAD_SQLSTATE
+create procedure proc_8759()
+begin
+ declare should_be_illegal condition for sqlstate '00000';
+ declare continue handler for should_be_illegal set @x=0;
+end$$
+
+--error ER_SP_BAD_SQLSTATE
+create procedure proc_8759()
+begin
+ declare continue handler for sqlstate '00000' set @x=0;
+end$$
+
+delimiter ;$$
+
+
+#
# BUG#NNNN: New bug synopsis
#
#--disable_warnings