1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fixed BUG#7299: Stored procedures: exception handler catches not-found conditions

mysql-test/r/sp-error.result:
  Added test case for BUG#7299.
mysql-test/t/sp-error.test:
  Added test case for BUG#7299.
sql/sp_rcontext.cc:
  Corrected cut&paste error; make sure we only catch actual errors with sqlexception.
This commit is contained in:
unknown
2005-04-08 16:05:16 +02:00
parent 99c0dd3bc6
commit 5f006200d1
3 changed files with 37 additions and 2 deletions

View File

@ -513,4 +513,17 @@ call bug9566()|
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|