mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Fixed BUG#14376: MySQL crash on scoped variable (re)initialization
Added finer scope control for default clauses of local variable declarations.
This commit is contained in:
@ -4489,6 +4489,51 @@ DROP TABLE IF EXISTS bug13095_t1;
|
||||
delimiter |;
|
||||
|
||||
|
||||
#
|
||||
# BUG#14376: MySQL crash on scoped variable (re)initialization
|
||||
#
|
||||
--disable_warnings
|
||||
drop procedure if exists bug14376|
|
||||
--enable_warnings
|
||||
|
||||
create procedure bug14376()
|
||||
begin
|
||||
declare x int default x;
|
||||
end|
|
||||
|
||||
# Not the error we want, but that's what we got for now...
|
||||
--error ER_BAD_FIELD_ERROR
|
||||
call bug14376()|
|
||||
drop procedure bug14376|
|
||||
|
||||
create procedure bug14376()
|
||||
begin
|
||||
declare x int default 42;
|
||||
|
||||
begin
|
||||
declare x int default x;
|
||||
|
||||
select x;
|
||||
end;
|
||||
end|
|
||||
|
||||
call bug14376()|
|
||||
|
||||
drop procedure bug14376|
|
||||
|
||||
create procedure bug14376(x int)
|
||||
begin
|
||||
declare x int default x;
|
||||
|
||||
select x;
|
||||
end|
|
||||
|
||||
call bug14376(4711)|
|
||||
|
||||
drop procedure bug14376|
|
||||
|
||||
|
||||
|
||||
#
|
||||
# BUG#NNNN: New bug synopsis
|
||||
#
|
||||
|
Reference in New Issue
Block a user