From e89f5a71363f52ebb4c4e1578c0dcbabed74e4ca Mon Sep 17 00:00:00 2001 From: "sergefp@mysql.com" <> Date: Tue, 21 Dec 2004 01:59:58 +0300 Subject: Fix for BUG#4480: In joins with SELECT_STRAIGHT_JOIN re-order tables by outer join dependency, so we read dependent tables after tables they depend on (this is needed for outer joins) --- mysql-test/r/join_outer.result | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'mysql-test/r/join_outer.result') diff --git a/mysql-test/r/join_outer.result b/mysql-test/r/join_outer.result index 2f420905195..b7343065c73 100644 --- a/mysql-test/r/join_outer.result +++ b/mysql-test/r/join_outer.result @@ -853,4 +853,19 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1 Using index 1 SIMPLE t2 ALL NULL NULL NULL NULL 2 1 SIMPLE t3 ALL NULL NULL NULL NULL 2 +drop table t1,t2; +create table t1 (a int, b int); +insert into t1 values (1,1),(2,2),(3,3); +create table t2 (a int, b int); +insert into t2 values (1,1), (2,2); +select * from t2 right join t1 on t2.a=t1.a; +a b a b +1 1 1 1 +2 2 2 2 +NULL NULL 3 3 +select straight_join * from t2 right join t1 on t2.a=t1.a; +a b a b +1 1 1 1 +2 2 2 2 +NULL NULL 3 3 DROP TABLE t0,t1,t2,t3; -- cgit v1.2.1