mirror of
https://github.com/MariaDB/server.git
synced 2026-04-30 12:15:32 +02:00
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.
This commit is contained in:
parent
5d9b5f5e4c
commit
b7e27e80d9
3 changed files with 14 additions and 9 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue