Fix for LP bug#998516

If we did nothing in resolving unique table conflict we should not retry (it leed to infinite loop).
Now we retry (recheck) unique table check only in case if we materialized a table.
This commit is contained in:
unknown 2012-05-15 08:31:07 +03:00
commit 3d37b67b2b
3 changed files with 32 additions and 1 deletions

View file

@ -1437,6 +1437,19 @@ drop table t1;
set optimizer_switch=@save978847_optimizer_switch;
--echo #
--echo # LP bug998516 Server hangs on INSERT .. SELECT with derived_merge,
--echo # FROM subquery, UNION
--echo #
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2);
CREATE TABLE t2 (b INT);
INSERT INTO t2 VALUES (3),(4);
INSERT INTO t1 SELECT * FROM ( SELECT * FROM t1 ) AS alias UNION SELECT * FROM t2;
select * from t1;
drop table t1,t2;
--echo #
--echo # end of 5.3 tests
--echo #