1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-14346: incorrect result of intersect with ANY/ALL/IN subquery

Reinit internal state of select_unit before using to correctly run it after first time.
This commit is contained in:
Oleksandr Byelkin
2017-11-13 10:02:59 +01:00
parent d2bf101cbf
commit d1b666b5c6
4 changed files with 44 additions and 4 deletions

View File

@@ -190,4 +190,19 @@ show create view v1;
drop view v1;
drop tables t1,t2,t3;
--echo #
--echo # MDEV-14346:incorrect result of intersect with ANY/ALL/IN subquery
--echo #
CREATE TABLE t (i INT);
INSERT INTO t VALUES (1),(2);
SELECT * FROM t WHERE i != ANY ( SELECT 6 INTERSECT SELECT 3 );
select i from t where
exists ((select 6 as r from dual having t.i <> 6)
intersect
(select 3 from dual having t.i <> 3));
drop table t;
--echo # End of 10.3 tests