Loading mysql-test/r/select.result +15 −0 Original line number Diff line number Diff line Loading @@ -2860,3 +2860,18 @@ a2 c 2 2 drop table t1, t2; drop view v2; create table t1 (a int(10), t1_val int(10)); create table t2 (b int(10), t2_val int(10)); create table t3 (a int(10), b int(10)); insert into t1 values (1,1),(2,2); insert into t2 values (1,1),(2,2),(3,3); insert into t3 values (1,1),(2,1),(3,1),(4,1); select * from t1 natural join t2 natural join t3; a b t1_val t2_val 1 1 1 1 2 1 2 1 select * from t1 natural join t3 natural join t2; b a t1_val t2_val 1 1 1 1 1 2 2 1 drop table t1, t2, t3; mysql-test/t/select.test +17 −0 Original line number Diff line number Diff line Loading @@ -2426,3 +2426,20 @@ select * from v2 natural right join t2; drop table t1, t2; drop view v2; # # Bug #4789 Incosistent results of more than 2-way natural joins due to # incorrect transformation to join ... on. # create table t1 (a int(10), t1_val int(10)); create table t2 (b int(10), t2_val int(10)); create table t3 (a int(10), b int(10)); insert into t1 values (1,1),(2,2); insert into t2 values (1,1),(2,2),(3,3); insert into t3 values (1,1),(2,1),(3,1),(4,1); # the following two queries must return the same result select * from t1 natural join t2 natural join t3; select * from t1 natural join t3 natural join t2; drop table t1, t2, t3; Loading
mysql-test/r/select.result +15 −0 Original line number Diff line number Diff line Loading @@ -2860,3 +2860,18 @@ a2 c 2 2 drop table t1, t2; drop view v2; create table t1 (a int(10), t1_val int(10)); create table t2 (b int(10), t2_val int(10)); create table t3 (a int(10), b int(10)); insert into t1 values (1,1),(2,2); insert into t2 values (1,1),(2,2),(3,3); insert into t3 values (1,1),(2,1),(3,1),(4,1); select * from t1 natural join t2 natural join t3; a b t1_val t2_val 1 1 1 1 2 1 2 1 select * from t1 natural join t3 natural join t2; b a t1_val t2_val 1 1 1 1 1 2 2 1 drop table t1, t2, t3;
mysql-test/t/select.test +17 −0 Original line number Diff line number Diff line Loading @@ -2426,3 +2426,20 @@ select * from v2 natural right join t2; drop table t1, t2; drop view v2; # # Bug #4789 Incosistent results of more than 2-way natural joins due to # incorrect transformation to join ... on. # create table t1 (a int(10), t1_val int(10)); create table t2 (b int(10), t2_val int(10)); create table t3 (a int(10), b int(10)); insert into t1 values (1,1),(2,2); insert into t2 values (1,1),(2,2),(3,3); insert into t3 values (1,1),(2,1),(3,1),(4,1); # the following two queries must return the same result select * from t1 natural join t2 natural join t3; select * from t1 natural join t3 natural join t2; drop table t1, t2, t3;