summaryrefslogtreecommitdiff
path: root/mysql-test/t/join_outer.test
diff options
context:
space:
mode:
authorhf@deer.(none) <>2003-12-12 21:26:20 +0400
committerhf@deer.(none) <>2003-12-12 21:26:20 +0400
commite6e0937dc45b9b4e179366098ea14c76120b6f5f (patch)
treeba27c057d64a301e15acd992f4117e0d62eb5108 /mysql-test/t/join_outer.test
parent1485d9b438757cf9ad5e6a822e6501568e4dcb44 (diff)
downloadmariadb-git-e6e0937dc45b9b4e179366098ea14c76120b6f5f.tar.gz
Proposed fix for #2093
it happens because of the LEFT JOINT optimization in add_key_part() This optimization does exactly the same in JOIN and in WHERE conditions Not right. I moved that optimization one level upper.
Diffstat (limited to 'mysql-test/t/join_outer.test')
-rw-r--r--mysql-test/t/join_outer.test13
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/t/join_outer.test b/mysql-test/t/join_outer.test
index ee7d55d2a4e..bed4d4b033b 100644
--- a/mysql-test/t/join_outer.test
+++ b/mysql-test/t/join_outer.test
@@ -437,3 +437,16 @@ select * from t1
left outer join t2 using (f2)
left outer join t3 using (f3);
drop table t1,t2,t3;
+
+create table t1 (a1 int, a2 int);
+create table t2 (b1 int not null, b2 int);
+create table t3 (c1 int, c2 int);
+
+insert into t1 values (1,2), (2,2), (3,2);
+insert into t2 values (1,3), (2,3);
+insert into t3 values (2,4), (3,4);
+
+select * from t1 left join t2 on b1 = a1 left join t3 on c1 = a1 and b1 is null;
+explain select * from t1 left join t2 on b1 = a1 left join t3 on c1 = a1 and b1 is null;
+
+drop table t1, t2, t3;