List:Commits« Previous MessageNext Message »
From:Konstantin Osipov Date:November 20 2009 10:43pm
Subject:bzr commit into mysql-5.6-next-mr branch (kostja:2929) Bug#36510
View as plain text  
#At file:///opt/local/work/next-mr-kostja/ based on revid:kostja@stripped

 2929 Konstantin Osipov	2009-11-21
      Backport the test caes for Bug#36510 from 6.0-codebase.
     @ mysql-test/t/sp-error.test
        Backport test of Bug#36510 (the bug itself is fixed by other
        backports, inc. SINGAL code).

    modified:
      mysql-test/r/sp-error.result
      mysql-test/t/sp-error.test
=== modified file 'mysql-test/r/sp-error.result'
--- a/mysql-test/r/sp-error.result	2009-11-19 23:48:08 +0000
+++ b/mysql-test/r/sp-error.result	2009-11-20 22:42:57 +0000
@@ -1659,6 +1659,29 @@ begin
 declare continue handler for sqlstate '00000' set @x=0;
 end$$
 ERROR 42000: Bad SQLSTATE: '00000'
+drop procedure if exists proc_36510;
+create procedure proc_36510()
+begin
+declare should_be_illegal condition for sqlstate '00123';
+declare continue handler for should_be_illegal set @x=0;
+end$$
+ERROR 42000: Bad SQLSTATE: '00123'
+create procedure proc_36510()
+begin
+declare continue handler for sqlstate '00123' set @x=0;
+end$$
+ERROR 42000: Bad SQLSTATE: '00123'
+create procedure proc_36510()
+begin
+declare should_be_illegal condition for 0;
+declare continue handler for should_be_illegal set @x=0;
+end$$
+ERROR HY000: Incorrect CONDITION value: '0'
+create procedure proc_36510()
+begin
+declare continue handler for 0 set @x=0;
+end$$
+ERROR HY000: Incorrect CONDITION value: '0'
 drop procedure if exists p1;
 set @old_recursion_depth = @@max_sp_recursion_depth;
 set @@max_sp_recursion_depth = 255;

=== modified file 'mysql-test/t/sp-error.test'
--- a/mysql-test/t/sp-error.test	2009-11-19 23:48:08 +0000
+++ b/mysql-test/t/sp-error.test	2009-11-20 22:42:57 +0000
@@ -2420,6 +2420,43 @@ end$$
 delimiter ;$$
 
 #
+# Bug#36510 (Stored Procedures: mysql_error_code 0 should be illegal)
+#
+
+--disable_warnings
+drop procedure if exists proc_36510;
+--enable_warnings
+
+delimiter $$;
+
+--error ER_SP_BAD_SQLSTATE
+create procedure proc_36510()
+begin
+  declare should_be_illegal condition for sqlstate '00123';
+  declare continue handler for should_be_illegal set @x=0;
+end$$
+
+--error ER_SP_BAD_SQLSTATE
+create procedure proc_36510()
+begin
+  declare continue handler for sqlstate '00123' set @x=0;
+end$$
+
+--error ER_WRONG_VALUE
+create procedure proc_36510()
+begin
+  declare should_be_illegal condition for 0;
+  declare continue handler for should_be_illegal set @x=0;
+end$$
+
+--error ER_WRONG_VALUE
+create procedure proc_36510()
+begin
+  declare continue handler for 0 set @x=0;
+end$$
+delimiter ;$$
+
+#
 # Bug#15192: "fatal errors" are caught by handlers in stored procedures
 #
 


Attachment: [text/bzr-bundle] bzr/kostja@sun.com-20091120224257-1x4j0dl1t865gqnl.bundle
Thread
bzr commit into mysql-5.6-next-mr branch (kostja:2929) Bug#36510Konstantin Osipov20 Nov