List:Commits« Previous MessageNext Message »
From:pem Date:January 25 2006 4:19pm
Subject:bk commit into 5.0 tree (pem:1.2008)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of pem. When pem 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
  1.2008 06/01/25 17:19:54 pem@stripped +3 -0
  Fixed BUGS#15011: error handler for mysql errno in nested block not activated
    For nested sql errno handlers (unlike sqlexception and other), we didn't stop
    searching when the innermost handler was found - now make sure we do.

  sql/sp_rcontext.cc
    1.39 06/01/25 17:19:50 pem@stripped +2 -1
    Make sure we stop at the innermost sql_errno handler.

  mysql-test/t/sp.test
    1.173 06/01/25 17:19:50 pem@stripped +31 -0
    New testcase for BUG#15011.

  mysql-test/r/sp.result
    1.184 06/01/25 17:19:50 pem@stripped +19 -0
    Updated result for BUG#15011.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	pem
# Host:	pem.mysql.com
# Root:	/extern/mysql/work/bug15011/mysql-5.0

--- 1.183/mysql-test/r/sp.result	2006-01-20 08:32:18 +01:00
+++ 1.184/mysql-test/r/sp.result	2006-01-25 17:19:50 +01:00
@@ -4497,4 +4497,23 @@
 drop procedure if exists bug15231_2|
 drop procedure if exists bug15231_3|
 drop procedure if exists bug15231_4|
+drop procedure if exists bug15011|
+create table t3 (c1 int primary key)|
+insert into t3 values (1)|
+create procedure bug15011()
+deterministic
+begin
+declare continue handler for 1062
+select 'Outer' as 'Handler';
+begin
+declare continue handler for 1062
+select 'Inner' as 'Handler';
+insert into t3 values (1);
+end;
+end|
+call bug15011()|
+Handler
+Inner
+drop procedure bug15011|
+drop table t3|
 drop table t1,t2;

--- 1.172/mysql-test/t/sp.test	2006-01-20 08:32:18 +01:00
+++ 1.173/mysql-test/t/sp.test	2006-01-25 17:19:50 +01:00
@@ -5284,6 +5284,37 @@
 
 
 #
+# BUG#15011: error handler in nested block not activated
+#
+--disable_warnings
+drop procedure if exists bug15011|
+--enable_warnings
+
+create table t3 (c1 int primary key)|
+
+insert into t3 values (1)|
+
+create procedure bug15011()
+  deterministic
+begin
+  declare continue handler for 1062
+    select 'Outer' as 'Handler';
+
+  begin
+    declare continue handler for 1062
+      select 'Inner' as 'Handler';
+
+    insert into t3 values (1);
+  end;
+end|
+
+call bug15011()|
+
+drop procedure bug15011|
+drop table t3|
+
+
+#
 # BUG#NNNN: New bug synopsis
 #
 #--disable_warnings

--- 1.38/sql/sp_rcontext.cc	2006-01-17 12:48:44 +01:00
+++ 1.39/sql/sp_rcontext.cc	2006-01-25 17:19:50 +01:00
@@ -188,7 +188,8 @@
     switch (cond->type)
     {
     case sp_cond_type_t::number:
-      if (sql_errno == cond->mysqlerr)
+      if (sql_errno == cond->mysqlerr &&
+          (found < 0 || m_handler[found].cond->type > sp_cond_type_t::number))
 	found= i;		// Always the most specific
       break;
     case sp_cond_type_t::state:
Thread
bk commit into 5.0 tree (pem:1.2008)pem25 Jan