summaryrefslogtreecommitdiff
path: root/mysql-test/r/derived.result
diff options
context:
space:
mode:
authorunknown <sanja@askmonty.org>2013-10-21 13:45:49 +0300
committerunknown <sanja@askmonty.org>2013-10-21 13:45:49 +0300
commit94ad392fd86b53f798c7de9489afe901e1f3a9b6 (patch)
tree6fc990446283234f7582a777ab556a7657cbc8a6 /mysql-test/r/derived.result
parent046fe91161ebe40c9af4e1354587783d64f73ddd (diff)
downloadmariadb-git-94ad392fd86b53f798c7de9489afe901e1f3a9b6.tar.gz
MDEV-5143: update of a joined table with a nested subquery with a syntax error crashes mysqld with signal 11
Added check of SELECT_LEX::handle_derived() result.
Diffstat (limited to 'mysql-test/r/derived.result')
-rw-r--r--mysql-test/r/derived.result27
1 files changed, 27 insertions, 0 deletions
diff --git a/mysql-test/r/derived.result b/mysql-test/r/derived.result
index 1042ee79e8c..e68636e0394 100644
--- a/mysql-test/r/derived.result
+++ b/mysql-test/r/derived.result
@@ -438,5 +438,32 @@ CALL p();
id
drop procedure p;
drop temporary table t1;
+#
+# MDEV-5143: update of a joined table with a nested subquery with
+# a syntax error crashes mysqld with signal 11
+#
+create table t1 (id int(11) not null auto_increment, val varchar(100) null,primary key (id));
+create table t2 (id int(11) not null auto_increment, val varchar(100) null,primary key (id));
+insert into t1 (val) values('a');
+insert into t2 (val) values('1');
+update
+(
+select
+val
+from
+(
+select
+v.val
+from
+t2 wrong_table_alias
+) t4
+) t3
+inner join t1 on
+t1.id=t3.val
+set
+t1.val=t3.val
+;
+ERROR 42S22: Unknown column 'v.val' in 'field list'
+drop table t1, t2;
# End of 5.3 tests
set optimizer_switch=@save_derived_optimizer_switch;