diff options
Diffstat (limited to 'mysql-test/r/subselect4.result')
-rw-r--r-- | mysql-test/r/subselect4.result | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/r/subselect4.result b/mysql-test/r/subselect4.result index e9284e427ef..1e4b6c9df0a 100644 --- a/mysql-test/r/subselect4.result +++ b/mysql-test/r/subselect4.result @@ -2017,6 +2017,21 @@ ERROR 21000: Subquery returns more than 1 row DROP TABLE t2; ERROR 42S02: Unknown table 't2' DROP TABLE t1; +# +# LP BUG#1000649 EXPLAIN shows incorrectly a non-correlated constant IN subquery is correlated +# +create table ten (a int); +insert into ten values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t1 (a int, b int, c int); +insert into t1 select a,a,a from ten; +create table five (a int, b int, c int); +insert into five select a,a,a from ten limit 5; +set @@optimizer_switch='semijoin=on,in_to_exists=on,materialization=off'; +explain select * from t1 where 33 in (select b from five) or c > 11; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 10 Using where +2 SUBQUERY five ALL NULL NULL NULL NULL 5 Using where +drop table ten, t1, five; set optimizer_switch=@subselect4_tmp; SET optimizer_switch= @@global.optimizer_switch; set @@tmp_table_size= @@global.tmp_table_size; |