diff options
author | Sergei Golubchik <sergii@pisem.net> | 2014-03-16 19:21:37 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2014-03-16 19:21:37 +0100 |
commit | 5d8c15228e38330c2befff7f8fb1b66947dcc70d (patch) | |
tree | c0ddd5a0ba88560c63bc20aa3707fff2580e8fac /mysql-test/t/subselect4.test | |
parent | 9e135ce19fccea9c6c981b2de521b2ae750e26e5 (diff) | |
parent | cfc83cf9d3c3354d47f9e7ee903ea279f60cce58 (diff) | |
download | mariadb-git-5d8c15228e38330c2befff7f8fb1b66947dcc70d.tar.gz |
5.3-merge
Diffstat (limited to 'mysql-test/t/subselect4.test')
-rw-r--r-- | mysql-test/t/subselect4.test | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/t/subselect4.test b/mysql-test/t/subselect4.test index 1c058c5e6e1..b179ead39d7 100644 --- a/mysql-test/t/subselect4.test +++ b/mysql-test/t/subselect4.test @@ -1889,6 +1889,27 @@ DROP VIEW v2; DROP TABLE t1,t2; --echo # +--echo # MDEV-5686: degenerate disjunct in NOT IN subquery +--echo # + +CREATE TABLE t1 (a int, b int, c varchar(3)) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1,1,'CAN'),(2,2,'AUS'); + +CREATE TABLE t2 (f int) ENGINE=MyISAM; +INSERT INTO t2 VALUES (3); + +EXPLAIN EXTENDED +SELECT * FROM t2 + WHERE f NOT IN (SELECT b FROM t1 + WHERE 0 OR (c IN ('USA') OR c NOT IN ('USA')) AND a = b); + +SELECT * FROM t2 + WHERE f NOT IN (SELECT b FROM t1 + WHERE 0 OR (c IN ('USA') OR c NOT IN ('USA')) AND a = b); + +DROP TABLE t1,t2; + +--echo # --echo # MDEV-3899 Valgrind warnings (blocks are definitely lost) in filesort on IN subquery with SUM and DISTINCT --echo # |