From 952e2cd42af99102c74d16abc61b37e2c42055b0 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 8 Jan 2004 09:27:29 +0100 Subject: 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.) --- mysql-test/t/sp-error.test | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'mysql-test/t/sp-error.test') diff --git a/mysql-test/t/sp-error.test b/mysql-test/t/sp-error.test index b8b60ac8dde..e33d4d36be7 100644 --- a/mysql-test/t/sp-error.test +++ b/mysql-test/t/sp-error.test @@ -388,6 +388,20 @@ call bug1653()| drop procedure bug1653| drop table t3| +# +# BUG#2272 +# +create procedure bug2272() +begin + declare v int; + + update t1 set v = 42; +end| + +insert into t1 values (666, 51.3)| +--error 1054 +call bug2272()| +delete from t1| drop table t1| -- cgit v1.2.1