summaryrefslogtreecommitdiff
path: root/mysql-test/t/select.test
diff options
context:
space:
mode:
authorunknown <Sinisa@sinisa.nasamreza.org>2003-08-22 18:43:46 +0300
committerunknown <Sinisa@sinisa.nasamreza.org>2003-08-22 18:43:46 +0300
commit484a7f61a84912e8506772ae4cbee3880e140b70 (patch)
tree6116b622fcbb528013b9fec903f0efd6927f75e2 /mysql-test/t/select.test
parentbd6347df9318f46f715615e2a33ff9ba2d9dbb59 (diff)
parentf300d40aa74525cd4ef2d434f396d70a253fe211 (diff)
downloadmariadb-git-484a7f61a84912e8506772ae4cbee3880e140b70.tar.gz
After merge fixes
mysql-test/r/func_test.result: Auto merged mysql-test/r/grant.result: Auto merged mysql-test/t/func_test.test: Auto merged mysql-test/t/grant.test: Auto merged sql/ha_innodb.cc: Auto merged sql/item_cmpfunc.cc: Auto merged sql/mysql_priv.h: Auto merged sql/sql_acl.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_parse.cc: Auto merged sql/sql_table.cc: Auto merged sql/sql_yacc.yy: Auto merged
Diffstat (limited to 'mysql-test/t/select.test')
-rw-r--r--mysql-test/t/select.test20
1 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test
index c2e451ea7f3..9884c88b420 100644
--- a/mysql-test/t/select.test
+++ b/mysql-test/t/select.test
@@ -1832,3 +1832,23 @@ INSERT INTO t2 VALUES (2517), (2518), (2519), (2520), (2521), (2522);
select * from t1, t2 WHERE t1.t2_id = t2.id and t1.t2_id > 0 order by t1.id LIMIT 0, 5;
drop table t1,t2;
+#
+# outer join, impossible on condition, where, and usable key for range
+#
+create table t1 (id1 int NOT NULL);
+create table t2 (id2 int NOT NULL);
+create table t3 (id3 int NOT NULL);
+create table t4 (id4 int NOT NULL, id44 int NOT NULL, KEY (id4));
+
+insert into t1 values (1);
+insert into t1 values (2);
+insert into t2 values (1);
+insert into t4 values (1,1);
+
+explain select * from t1 left join t2 on id1 = id2 left join t3 on id1 = id3
+left join t4 on id3 = id4 where id2 = 1 or id4 = 1;
+select * from t1 left join t2 on id1 = id2 left join t3 on id1 = id3
+left join t4 on id3 = id4 where id2 = 1 or id4 = 1;
+
+drop table t1,t2,t3,t4;
+