mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Fixed BUG#2329: Crash if insert with variable name in stored procedure.
Found a few more places in the parser (insert, replace and update) where local stored procedure variables should not be recognized. mysql-test/r/sp-error.result: Test cases for BUG#2329 mysql-test/r/sp.result: New test case for certain context dependencies for symbols. mysql-test/t/sp-error.test: Test cases for BUG#2329 mysql-test/t/sp.test: New test case for certain context dependencies for symbols. sql/sql_yacc.yy: Found a few more places where local SP variables should not be recognized.
This commit is contained in:
@ -302,4 +302,20 @@ call bug2272()|
|
||||
ERROR 42S22: Unknown column 'v' in 'field list'
|
||||
delete from t1|
|
||||
drop procedure bug2272|
|
||||
create procedure bug2329_1()
|
||||
begin
|
||||
declare v int;
|
||||
insert into t1 (v) values (5);
|
||||
end|
|
||||
create procedure bug2329_2()
|
||||
begin
|
||||
declare v int;
|
||||
replace t1 set v = 5;
|
||||
end|
|
||||
call bug2329_1()|
|
||||
ERROR 42S22: Unknown column 'v' in 'field list'
|
||||
call bug2329_2()|
|
||||
ERROR 42S22: Unknown column 'v' in 'field list'
|
||||
drop procedure bug2329_1|
|
||||
drop procedure bug2329_2|
|
||||
drop table t1|
|
||||
|
Reference in New Issue
Block a user