1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Backport the test caes for Bug#36510 from 6.0-codebase.

This commit is contained in:
Konstantin Osipov
2009-11-21 01:42:57 +03:00
parent 5a78d2a7d5
commit a4b2b2b9f0
2 changed files with 60 additions and 0 deletions

View File

@@ -2419,6 +2419,43 @@ end$$
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
#