mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Fixed BUG#7299: Stored procedures: exception handler catches not-found conditions
This commit is contained in:
@@ -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|
|
||||
|
||||
Reference in New Issue
Block a user