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/t/insert_select.test | |
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/t/insert_select.test')
-rw-r--r-- | mysql-test/t/insert_select.test | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mysql-test/t/insert_select.test b/mysql-test/t/insert_select.test index 5dd6f338865..0e1d48fe9f5 100644 --- a/mysql-test/t/insert_select.test +++ b/mysql-test/t/insert_select.test @@ -225,3 +225,12 @@ insert into t1(x,y) select x,z from t2 on duplicate key update x=values(t2.x); drop table t1,t2; # End of 4.1 tests + +# +# Bug #18080: INSERT ... SELECT ... JOIN results in ambiguous field list error +# +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; |