diff options
Diffstat (limited to 'mysql-test/t/join_outer.test')
-rw-r--r-- | mysql-test/t/join_outer.test | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/t/join_outer.test b/mysql-test/t/join_outer.test index d048208a8ff..4ffe1c075b6 100644 --- a/mysql-test/t/join_outer.test +++ b/mysql-test/t/join_outer.test @@ -438,3 +438,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; |