mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Bug#8759 (Stored Procedures: SQLSTATE '00000' should be illegal)
Fixed the parser to reject SQLSTATE '00000', since '00000' is the successful completion condition, and can not be caught by an exception handler in SQL. mysql-test/r/sp-error.result: Bug#8759 (Stored Procedures: SQLSTATE '00000' should be illegal) mysql-test/t/sp-error.test: Bug#8759 (Stored Procedures: SQLSTATE '00000' should be illegal) sql/sp_pcontext.cc: Bug#8759 (Stored Procedures: SQLSTATE '00000' should be illegal)
This commit is contained in:
@ -1638,3 +1638,15 @@ Warning 1287 The syntax 'TYPE=storage_engine' is deprecated and will be removed
|
||||
call p1();
|
||||
call p1();
|
||||
drop procedure p1;
|
||||
drop procedure if exists proc_8759;
|
||||
create procedure proc_8759()
|
||||
begin
|
||||
declare should_be_illegal condition for sqlstate '00000';
|
||||
declare continue handler for should_be_illegal set @x=0;
|
||||
end$$
|
||||
ERROR 42000: Bad SQLSTATE: '00000'
|
||||
create procedure proc_8759()
|
||||
begin
|
||||
declare continue handler for sqlstate '00000' set @x=0;
|
||||
end$$
|
||||
ERROR 42000: Bad SQLSTATE: '00000'
|
||||
|
Reference in New Issue
Block a user