diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2012-02-14 13:58:57 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2012-02-14 13:58:57 +0400 |
commit | c9355dc279ac30cc41ff076d20414fd59c36091d (patch) | |
tree | a54a3d4a249e6c7ed0992baf5b0e2f58ecf70b1a /mysql-test/r/subselect_mat.result | |
parent | 3efc8d016f1e1fbc854a4698e1d06aba5fa2ec15 (diff) | |
download | mariadb-git-c9355dc279ac30cc41ff076d20414fd59c36091d.tar.gz |
BUG#928048: Query containing IN subquery with OR in the where clause returns a wrong result
- Make equality propagation work correctly when done inside the OR branches
Diffstat (limited to 'mysql-test/r/subselect_mat.result')
-rw-r--r-- | mysql-test/r/subselect_mat.result | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/r/subselect_mat.result b/mysql-test/r/subselect_mat.result index 009510276b5..6f90cc868a6 100644 --- a/mysql-test/r/subselect_mat.result +++ b/mysql-test/r/subselect_mat.result @@ -1831,6 +1831,23 @@ id select_type table type possible_keys key key_len ref rows Extra 3 MATERIALIZED alias3 ALL NULL NULL NULL NULL 2 3 MATERIALIZED alias4 index c c 11 NULL 2 Using where; Using index; Using join buffer (flat, BNL join) DROP TABLE t1,t2; +# +# BUG#928048: Query containing IN subquery with OR in the where clause returns a wrong result +# +create table t1 (a int, b int); +insert into t1 values (7,5), (3,3), (5,4), (9,3); +create table t2 (a int, b int, index i_a(a)); +insert into t2 values +(4,2), (7,9), (7,4), (3,1), (5,3), (3,1), (9,4), (8,1); +explain select * from t1 where t1.a in (select a from t2 where t2.a=7 or t2.b<=1); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 4 Using where +2 MATERIALIZED t2 ALL i_a NULL NULL NULL 8 Using where +select * from t1 where t1.a in (select a from t2 where t2.a=7 or t2.b<=1); +a b +7 5 +3 3 +drop table t1,t2; # This must be at the end: set optimizer_switch=@subselect_sj_mat_tmp; set join_cache_level=@save_join_cache_level; |