summaryrefslogtreecommitdiff
path: root/mysql-test/r/insert_select.result
diff options
context:
space:
mode:
authorevgen@moonbone.local <>2005-10-25 20:04:12 +0400
committerevgen@moonbone.local <>2005-10-25 20:04:12 +0400
commit8cb0dff9049a0783bc98c13fc43d322029cac613 (patch)
treec02babc6eea474c8c1c524a69234536b7eafae07 /mysql-test/r/insert_select.result
parent3042591a9f2b6c72340572fa0e3feab371638ee9 (diff)
downloadmariadb-git-8cb0dff9049a0783bc98c13fc43d322029cac613.tar.gz
Fix bug#13392 Wrong VALUES() behaviour in INSERT SELECT with ON DUPLICATE
VALUES() can only refer to table insert going to. But Item_insert_value::fix_fields() were passing to it's arg full table list, This results in finding second column which shouldn't be found, and failing with error about ambiguous field. Item_insert_value::fix_fields() now passes only first table of full table list.
Diffstat (limited to 'mysql-test/r/insert_select.result')
-rw-r--r--mysql-test/r/insert_select.result8
1 files changed, 8 insertions, 0 deletions
diff --git a/mysql-test/r/insert_select.result b/mysql-test/r/insert_select.result
index d4eb4e8b788..028b40ac3b6 100644
--- a/mysql-test/r/insert_select.result
+++ b/mysql-test/r/insert_select.result
@@ -678,3 +678,11 @@ f1
2001
2002
drop table t1;
+create table t1(x int, y int);
+create table t2(x int, z int);
+insert into t1(x,y) select x,z from t2 on duplicate key update x=values(x);
+insert into t1(x,y) select x,z from t2 on duplicate key update x=values(z);
+ERROR 42S22: Unknown column 'z' in 'field list'
+insert into t1(x,y) select x,z from t2 on duplicate key update x=values(t2.x);
+ERROR 42S02: Unknown table 't2' in field list
+drop table t1,t2;