summaryrefslogtreecommitdiff
path: root/mysql-test/t/select.test
diff options
context:
space:
mode:
authortimour@mysql.com <>2004-08-30 18:14:29 +0300
committertimour@mysql.com <>2004-08-30 18:14:29 +0300
commit61eff52d23113d45ae9bd35812eacd2a264a1a85 (patch)
tree2e84890988c4f68ab8eb25bbf8b51d41b25b146d /mysql-test/t/select.test
parent4d070fd92b9398c55d7ca7ba5654b783bc5a30ea (diff)
downloadmariadb-git-61eff52d23113d45ae9bd35812eacd2a264a1a85.tar.gz
added test for BUG#3759
Diffstat (limited to 'mysql-test/t/select.test')
-rw-r--r--mysql-test/t/select.test14
1 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test
index 7cb157f194e..11b3ae6aed1 100644
--- a/mysql-test/t/select.test
+++ b/mysql-test/t/select.test
@@ -1874,3 +1874,17 @@ select * from t3 where s = 'one';
select * from t1,t2 where t1.s = t2.s;
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; \ No newline at end of file