diff options
author | unknown <gkodinov@mysql.com> | 2006-06-19 17:34:12 +0300 |
---|---|---|
committer | unknown <gkodinov@mysql.com> | 2006-06-19 17:34:12 +0300 |
commit | b7e27e80d9dc065d2ecc49aad371a71ad3a824a4 (patch) | |
tree | 6b13b3f10b8d0472a62afabf0b18bc17897740ed /mysql-test/r/insert_select.result | |
parent | 5d9b5f5e4c8d57b58f930f48dfd4553775bc7025 (diff) | |
download | mariadb-git-b7e27e80d9dc065d2ecc49aad371a71ad3a824a4.tar.gz |
Bug #18080: INSERT ... SELECT ... JOIN results in ambiguous field list error
There was an incomplete reset of the name resolution context, that caused
INSERT ... SELECT ... JOIN statements to resolve not by joint row type calculated
for the join.
Removed the redundant re-initialization of the context, because
mysql_insert_select_prepare() now correctly saves/restores the context.
mysql-test/r/insert_select.result:
Bug #18080: INSERT ... SELECT ... JOIN results in ambiguous field list error
- testsuite for the bug
mysql-test/t/insert_select.test:
Bug #18080: INSERT ... SELECT ... JOIN results in ambiguous field list error
- testsuite for the bug
sql/sql_parse.cc:
Bug #18080: INSERT ... SELECT ... JOIN results in ambiguous field list error
- remove an incomplete reset of the context because the mentioned function
correctly saves/restores the context.
Diffstat (limited to 'mysql-test/r/insert_select.result')
-rw-r--r-- | mysql-test/r/insert_select.result | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mysql-test/r/insert_select.result b/mysql-test/r/insert_select.result index 434dddb3049..62450997260 100644 --- a/mysql-test/r/insert_select.result +++ b/mysql-test/r/insert_select.result @@ -686,3 +686,8 @@ 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 42S22: Unknown column 't2.x' in 'field list' drop table t1,t2; +CREATE TABLE t1 (x int, y int); +CREATE TABLE t2 (z int, y int); +CREATE TABLE t3 (a int, b int); +INSERT INTO t3 (SELECT x, y FROM t1 JOIN t2 USING (y) WHERE z = 1); +DROP TABLE IF EXISTS t1,t2,t3; |