mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Fixed BUG#4904: Stored procedure crash if continue handler for HY000 errors.
The description is not entirerly correct. The issue was follow-up errors where the first error is not caught - in which case it's often a system error with errcode < 1000 (which are mapped by default to 'HY000'). In this case the error state is different from what was assumed in the execution loop. mysql-test/r/sp.result: New test case for BUG#4902. mysql-test/t/sp.test: New test case for BUG#4902. sql/sp_head.cc: Don't test the net.report_error flag in the execution loop. (Don't know why this was done in the first place, as it seems to serve no purpose.)
This commit is contained in:
@ -2237,6 +2237,14 @@ Tables_in_test (foo) table_type
|
||||
Variable_name Value
|
||||
Level Code Message
|
||||
drop procedure bug4902|
|
||||
drop table if exists t3|
|
||||
create procedure bug4904()
|
||||
begin
|
||||
declare continue handler for sqlstate 'HY000' begin end;
|
||||
create table t2 as select * from t;
|
||||
end|
|
||||
call bug4904()|
|
||||
drop procedure bug4904|
|
||||
drop table if exists fac|
|
||||
create table fac (n int unsigned not null primary key, f bigint unsigned)|
|
||||
create procedure ifac(n int unsigned)
|
||||
|
@ -1717,6 +1717,24 @@ call bug4902()|
|
||||
|
||||
drop procedure bug4902|
|
||||
|
||||
#
|
||||
# BUG#4904
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists t3|
|
||||
--enable_warnings
|
||||
|
||||
create procedure bug4904()
|
||||
begin
|
||||
declare continue handler for sqlstate 'HY000' begin end;
|
||||
|
||||
create table t2 as select * from t;
|
||||
end|
|
||||
|
||||
call bug4904()|
|
||||
|
||||
drop procedure bug4904|
|
||||
|
||||
|
||||
#
|
||||
# Some "real" examples
|
||||
|
Reference in New Issue
Block a user