Backport the test caes for Bug#36510 from 6.0-codebase.
mysql-test/t/sp-error.test: Backport test of Bug#36510 (the bug itself is fixed by other backports, inc. SINGAL code).
This commit is contained in:
parent
8d33101179
commit
5e433c13d7
@ -1659,6 +1659,29 @@ begin
|
|||||||
declare continue handler for sqlstate '00000' set @x=0;
|
declare continue handler for sqlstate '00000' set @x=0;
|
||||||
end$$
|
end$$
|
||||||
ERROR 42000: Bad SQLSTATE: '00000'
|
ERROR 42000: Bad SQLSTATE: '00000'
|
||||||
|
drop procedure if exists proc_36510;
|
||||||
|
create procedure proc_36510()
|
||||||
|
begin
|
||||||
|
declare should_be_illegal condition for sqlstate '00123';
|
||||||
|
declare continue handler for should_be_illegal set @x=0;
|
||||||
|
end$$
|
||||||
|
ERROR 42000: Bad SQLSTATE: '00123'
|
||||||
|
create procedure proc_36510()
|
||||||
|
begin
|
||||||
|
declare continue handler for sqlstate '00123' set @x=0;
|
||||||
|
end$$
|
||||||
|
ERROR 42000: Bad SQLSTATE: '00123'
|
||||||
|
create procedure proc_36510()
|
||||||
|
begin
|
||||||
|
declare should_be_illegal condition for 0;
|
||||||
|
declare continue handler for should_be_illegal set @x=0;
|
||||||
|
end$$
|
||||||
|
ERROR HY000: Incorrect CONDITION value: '0'
|
||||||
|
create procedure proc_36510()
|
||||||
|
begin
|
||||||
|
declare continue handler for 0 set @x=0;
|
||||||
|
end$$
|
||||||
|
ERROR HY000: Incorrect CONDITION value: '0'
|
||||||
drop procedure if exists p1;
|
drop procedure if exists p1;
|
||||||
set @old_recursion_depth = @@max_sp_recursion_depth;
|
set @old_recursion_depth = @@max_sp_recursion_depth;
|
||||||
set @@max_sp_recursion_depth = 255;
|
set @@max_sp_recursion_depth = 255;
|
||||||
|
@ -2419,6 +2419,43 @@ end$$
|
|||||||
|
|
||||||
delimiter ;$$
|
delimiter ;$$
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug#36510 (Stored Procedures: mysql_error_code 0 should be illegal)
|
||||||
|
#
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
drop procedure if exists proc_36510;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
|
delimiter $$;
|
||||||
|
|
||||||
|
--error ER_SP_BAD_SQLSTATE
|
||||||
|
create procedure proc_36510()
|
||||||
|
begin
|
||||||
|
declare should_be_illegal condition for sqlstate '00123';
|
||||||
|
declare continue handler for should_be_illegal set @x=0;
|
||||||
|
end$$
|
||||||
|
|
||||||
|
--error ER_SP_BAD_SQLSTATE
|
||||||
|
create procedure proc_36510()
|
||||||
|
begin
|
||||||
|
declare continue handler for sqlstate '00123' set @x=0;
|
||||||
|
end$$
|
||||||
|
|
||||||
|
--error ER_WRONG_VALUE
|
||||||
|
create procedure proc_36510()
|
||||||
|
begin
|
||||||
|
declare should_be_illegal condition for 0;
|
||||||
|
declare continue handler for should_be_illegal set @x=0;
|
||||||
|
end$$
|
||||||
|
|
||||||
|
--error ER_WRONG_VALUE
|
||||||
|
create procedure proc_36510()
|
||||||
|
begin
|
||||||
|
declare continue handler for 0 set @x=0;
|
||||||
|
end$$
|
||||||
|
delimiter ;$$
|
||||||
|
|
||||||
#
|
#
|
||||||
# Bug#15192: "fatal errors" are caught by handlers in stored procedures
|
# Bug#15192: "fatal errors" are caught by handlers in stored procedures
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user