diff options
Diffstat (limited to 'mysql-test/t/select.test')
-rw-r--r-- | mysql-test/t/select.test | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test index 3a3c1243c7c..e548aba29fe 100644 --- a/mysql-test/t/select.test +++ b/mysql-test/t/select.test @@ -1900,6 +1900,20 @@ select * from t2,t3 where t2.s = t3.s; drop table t1, t2, t3; # +# Bug #3759 +# Both queries should produce identical plans and results. +# +create table t1 (a integer, b integer, index(a), index(b)); +create table t2 (c integer, d integer, index(c), index(d)); +insert into t1 values (1,2), (2,2), (3,2), (4,2); +insert into t2 values (1,3), (2,3), (3,4), (4,4); +explain select * from t1 left join t2 on a=c where d in (4); +select * from t1 left join t2 on a=c where d in (4); +explain select * from t1 left join t2 on a=c where d = 4; +select * from t1 left join t2 on a=c where d = 4; +drop table t1, t2; + +# # Covering index is mentioned in EXPLAIN output for const tables (bug #5333) # @@ -1916,8 +1930,6 @@ INSERT INTO t1 VALUES (3,'c'); EXPLAIN SELECT i FROM t1 WHERE i=1; -EXPLAIN SELECT i FROM t1 WHERE i=1; - DROP TABLE t1; # |