mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Fix BUG#2272: Crash if update with variable name in stored procedure.
Parse column names (and not variables) only in UPDATE ... SET ... mysql-test/r/sp-error.result: New test case for BUG#2272 mysql-test/t/sp-error.test: New test case for BUG#2272 sql/sql_yacc.yy: "UPDATE table SET id = val" should only recognize column names, and not local SP variables for 'id'. (Also removed "as locator" syntax which is not supported.)
This commit is contained in:
@ -283,4 +283,13 @@ create table t3 (column_1 int)|
|
||||
call bug1653()|
|
||||
drop procedure bug1653|
|
||||
drop table t3|
|
||||
create procedure bug2272()
|
||||
begin
|
||||
declare v int;
|
||||
update t1 set v = 42;
|
||||
end|
|
||||
insert into t1 values (666, 51.3)|
|
||||
call bug2272()|
|
||||
ERROR 42S22: Unknown column 'v' in 'field list'
|
||||
delete from t1|
|
||||
drop table t1|
|
||||
|
Reference in New Issue
Block a user