1
0
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:
pem@mysql.com
2005-11-01 14:58:52 +01:00
parent 69cd4c1ebf
commit 4e9e038ff9
5 changed files with 100 additions and 3 deletions

View File

@ -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
#