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.1892 05/04/08 16:05:16 pem@stripped +3 -0
Fixed BUG#7299: Stored procedures: exception handler catches not-found conditions
sql/sp_rcontext.cc
1.19 05/04/08 16:05:11 pem@stripped +2 -2
Corrected cut&paste error; make sure we only catch actual errors with
sqlexception.
mysql-test/t/sp-error.test
1.63 05/04/08 16:05:11 pem@stripped +22 -0
Added test case for BUG#7299.
mysql-test/r/sp-error.result
1.61 05/04/08 16:05:11 pem@stripped +13 -0
Added test case for BUG#7299.
# 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: mysql.comhem.se
# Root: /home/pem/work/mysql-5.0
--- 1.60/mysql-test/r/sp-error.result Thu Apr 7 09:57:43 2005
+++ 1.61/mysql-test/r/sp-error.result Fri Apr 8 16:05:11 2005
@@ -513,4 +513,17 @@
ERROR HY000: Table 'proc' was not locked with LOCK TABLES
unlock tables|
drop procedure bug9566|
+drop procedure if exists bug7299|
+create procedure bug7299()
+begin
+declare v int;
+declare c cursor for select val from t1;
+declare exit handler for sqlexception select 'Error!';
+open c;
+fetch c into v;
+end|
+delete from t1|
+call bug7299()|
+ERROR 02000: No data to FETCH
+drop procedure bug7299|
drop table t1|
--- 1.62/mysql-test/t/sp-error.test Thu Apr 7 09:57:43 2005
+++ 1.63/mysql-test/t/sp-error.test Fri Apr 8 16:05:11 2005
@@ -721,6 +721,28 @@
#
+# BUG#7299: Stored procedures: exception handler catches not-found conditions
+#
+--disable_warnings
+drop procedure if exists bug7299|
+--enable_warnings
+create procedure bug7299()
+begin
+ declare v int;
+ declare c cursor for select val from t1;
+ declare exit handler for sqlexception select 'Error!';
+
+ open c;
+ fetch c into v;
+end|
+
+delete from t1|
+--error ER_SP_FETCH_NO_DATA
+call bug7299()|
+drop procedure bug7299|
+
+
+#
# BUG#NNNN: New bug synopsis
#
#--disable_warnings
--- 1.18/sql/sp_rcontext.cc Fri Mar 4 15:00:59 2005
+++ 1.19/sql/sp_rcontext.cc Fri Apr 8 16:05:11 2005
@@ -95,8 +95,8 @@
found= i;
break;
case sp_cond_type_t::exception:
- if ((sqlstate[0] != '0' || sqlstate[1] > '2' ||
- level == MYSQL_ERROR::WARN_LEVEL_ERROR) &&
+ if ((sqlstate[0] != '0' || sqlstate[1] > '2') &&
+ level == MYSQL_ERROR::WARN_LEVEL_ERROR &&
(found < 0 || m_handler[found].cond->type > sp_cond_type_t::state))
found= i;
break;
| Thread |
|---|
| • bk commit into 5.0 tree (pem:1.1892) BUG#7299 | pem | 8 Apr |