diff options
author | Konstantin Osipov <kostja@sun.com> | 2009-11-21 01:42:57 +0300 |
---|---|---|
committer | Konstantin Osipov <kostja@sun.com> | 2009-11-21 01:42:57 +0300 |
commit | 5e433c13d7f0c6c1019ea2a00e13ac6055527a06 (patch) | |
tree | d5b8ccbc68ab4595d1c5cb2b40af0f359755d412 /mysql-test/t/sp-error.test | |
parent | 8d33101179a3983b04c5314a9600229ff012d02f (diff) | |
download | mariadb-git-5e433c13d7f0c6c1019ea2a00e13ac6055527a06.tar.gz |
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).
Diffstat (limited to 'mysql-test/t/sp-error.test')
-rw-r--r-- | mysql-test/t/sp-error.test | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/mysql-test/t/sp-error.test b/mysql-test/t/sp-error.test index b022ca4b0e1..a9bb80647bc 100644 --- a/mysql-test/t/sp-error.test +++ b/mysql-test/t/sp-error.test @@ -2420,6 +2420,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 # |