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/r/subselect4.result | |
parent | 9e135ce19fccea9c6c981b2de521b2ae750e26e5 (diff) | |
parent | cfc83cf9d3c3354d47f9e7ee903ea279f60cce58 (diff) | |
download | mariadb-git-5d8c15228e38330c2befff7f8fb1b66947dcc70d.tar.gz |
5.3-merge
Diffstat (limited to 'mysql-test/r/subselect4.result')
-rw-r--r-- | mysql-test/r/subselect4.result | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/r/subselect4.result b/mysql-test/r/subselect4.result index 582b4e97f2e..c7f22cf05e5 100644 --- a/mysql-test/r/subselect4.result +++ b/mysql-test/r/subselect4.result @@ -2344,6 +2344,28 @@ id a2 a3 id a2 a3 DROP VIEW v2; DROP TABLE t1,t2; # +# MDEV-5686: degenerate disjunct in NOT IN subquery +# +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); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 system NULL NULL NULL NULL 1 100.00 +2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 2 100.00 Using where +Warnings: +Note 1003 select 3 AS `f` from dual where (not(<expr_cache><3>(<in_optimizer>(3,<exists>(select `test`.`t1`.`b` from `test`.`t1` where (((`test`.`t1`.`c` = 'USA') or (`test`.`t1`.`c` <> 'USA')) and trigcond(((<cache>(3) = `test`.`t1`.`b`) or isnull(`test`.`t1`.`b`))) and (`test`.`t1`.`b` = `test`.`t1`.`a`)) having trigcond(<is_not_null_test>(`test`.`t1`.`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); +f +3 +DROP TABLE t1,t2; +# # MDEV-3899 Valgrind warnings (blocks are definitely lost) in filesort on IN subquery with SUM and DISTINCT # CREATE TABLE t1 (a INT) ENGINE=MyISAM; |