summaryrefslogtreecommitdiff
path: root/mysql-test/t/sp-error.test
diff options
context:
space:
mode:
authorunknown <pem@mysql.comhem.se>2004-01-08 09:27:29 +0100
committerunknown <pem@mysql.comhem.se>2004-01-08 09:27:29 +0100
commit952e2cd42af99102c74d16abc61b37e2c42055b0 (patch)
treee33db53c3a4c2445a62dfedb86c6a2598018fa0a /mysql-test/t/sp-error.test
parentd4898d174c7e728a66831a299b8dddfd5ca6e802 (diff)
downloadmariadb-git-952e2cd42af99102c74d16abc61b37e2c42055b0.tar.gz
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.)
Diffstat (limited to 'mysql-test/t/sp-error.test')
-rw-r--r--mysql-test/t/sp-error.test14
1 files changed, 14 insertions, 0 deletions
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|