List:Commits« Previous MessageNext Message »
From:Davi Arnaut Date:January 8 2008 8:43pm
Subject:bk commit into 5.0 tree (davi:1.2583) BUG#29770
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of davi. When davi does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2008-01-08 18:43:25-02:00, davi@stripped +2 -0
  Bug#29770 Two handlers are allowed to catch an error in an stored procedure.
  
  Add test case.

  mysql-test/r/sp.result@stripped, 2008-01-08 18:43:24-02:00, davi@stripped +16 -0
    Add test case result for Bug#29770

  mysql-test/t/sp.test@stripped, 2008-01-08 18:43:24-02:00, davi@stripped +24 -0
    Add test case for Bug#29770

diff -Nrup a/mysql-test/r/sp.result b/mysql-test/r/sp.result
--- a/mysql-test/r/sp.result	2007-10-29 08:58:08 -02:00
+++ b/mysql-test/r/sp.result	2008-01-08 18:43:24 -02:00
@@ -6578,6 +6578,22 @@ DROP PROCEDURE db28318_a.t1;
 DROP PROCEDURE db28318_b.t2;
 DROP DATABASE db28318_a;
 DROP DATABASE db28318_b;
+USE test;
+DROP TABLE IF EXISTS t1;
+DROP PROCEDURE IF EXISTS bug29770;
+CREATE TABLE t1(a int);
+CREATE PROCEDURE bug29770()
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLSTATE '42S22' SET @state:= 'run';
+DECLARE CONTINUE HANDLER FOR SQLEXCEPTION SET @exception:= 'run';
+SELECT x FROM t1;
+END|
+CALL bug29770();
+SELECT @state, @exception;
+@state	@exception
+run	NULL
+DROP TABLE t1;
+DROP PROCEDURE bug29770;
 # ------------------------------------------------------------------
 # -- End of 5.0 tests
 # ------------------------------------------------------------------
diff -Nrup a/mysql-test/t/sp.test b/mysql-test/t/sp.test
--- a/mysql-test/t/sp.test	2007-10-29 08:58:08 -02:00
+++ b/mysql-test/t/sp.test	2008-01-08 18:43:24 -02:00
@@ -7698,6 +7698,30 @@ DROP PROCEDURE db28318_a.t1;
 DROP PROCEDURE db28318_b.t2;
 DROP DATABASE db28318_a;
 DROP DATABASE db28318_b;
+USE test;
+
+#
+# Bug#29770 Two handlers are allowed to catch an error in an stored procedure.
+#
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+DROP PROCEDURE IF EXISTS bug29770;
+--enable_warnings
+
+CREATE TABLE t1(a int);
+delimiter |;
+CREATE PROCEDURE bug29770()
+BEGIN
+  DECLARE CONTINUE HANDLER FOR SQLSTATE '42S22' SET @state:= 'run';
+  DECLARE CONTINUE HANDLER FOR SQLEXCEPTION SET @exception:= 'run';
+  SELECT x FROM t1;
+END|
+delimiter ;|
+CALL bug29770();
+SELECT @state, @exception;
+DROP TABLE t1;
+DROP PROCEDURE bug29770;
 
 
 --echo # ------------------------------------------------------------------
Thread
bk commit into 5.0 tree (davi:1.2583) BUG#29770Davi Arnaut8 Jan
  • Re: bk commit into 5.0 tree (davi:1.2583) BUG#29770Marc Alff8 Jan