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:
@@ -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
|
||||
|
Reference in New Issue
Block a user