summaryrefslogtreecommitdiff
path: root/mysql-test/t/update.test
diff options
context:
space:
mode:
authorevgen@sunlight.local <>2007-03-04 00:47:42 +0300
committerevgen@sunlight.local <>2007-03-04 00:47:42 +0300
commit629c12316dbf363b2bc8f63e567cb8131896bba5 (patch)
treed5938cc047c9eaab10c798514fcb43a7ecb3b6f4 /mysql-test/t/update.test
parentcf9aca84b3d53d9d24a93b9716b74301e4e0f083 (diff)
downloadmariadb-git-629c12316dbf363b2bc8f63e567cb8131896bba5.tar.gz
Bug#25126: Wrongly resolved field leads to a crash.
When the ORDER BY clause gets fixed it's allowed to search in the current item_list in order to find aliased fields and expressions. This is ok for a SELECT but wrong for an UPDATE statement. If the ORDER BY clause will contain a non-existing field which is mentioned in the UPDATE set list then the server will crash due to using of non-existing (0x0) field. When an Item_field is getting fixed it's allowed to search item list for aliased expressions and fields only for selects.
Diffstat (limited to 'mysql-test/t/update.test')
-rw-r--r--mysql-test/t/update.test8
1 files changed, 8 insertions, 0 deletions
diff --git a/mysql-test/t/update.test b/mysql-test/t/update.test
index c69c56f0331..e5287eacbc8 100644
--- a/mysql-test/t/update.test
+++ b/mysql-test/t/update.test
@@ -306,4 +306,12 @@ create table t1(f1 int, `*f2` int);
insert into t1 values (1,1);
update t1 set `*f2`=1;
drop table t1;
+
+#
+# Bug#25126: Wrongly resolved field leads to a crash
+#
+create table t1(f1 int);
+--error 1054
+update t1 set f2=1 order by f2;
+drop table t1;
# End of 4.1 tests