--disable_abort_on_error --disable_warnings Drop table if exists test.t1 ; Drop table if exists test.t2 ; Drop table if exists test.t3 ; --enable_warnings CREATE TABLE test.t1 (f1 BIGINT); CREATE TABLE test.t2 (f2 BIGINT); CREATE TABLE test.t3 (f3 BIGINT); use test ; # old style JOIN SELECT t1.f1, t2.f2, t3.f3 FROM t1, t2, t3 WHERE t1.f1 = t3.f3; # new style JOIN 1 SELECT t1.f1, t2.f2, t3.f3 FROM t1 JOIN t3 ON (t1.f1 = t3.f3) JOIN t2; # new style JOIN 1 SELECT t1.f1, t2.f2, t3.f3 FROM t1 JOIN t2 JOIN t3 ON (t1.f1 = t3.f3); # mixed style JOIN 1, first table of FROM part occurs after ON # This constellation worked within a VIEW in history. (The other were # not checked.) SELECT t1.f1, t2.f2, t3.f3 FROM t1,t2 JOIN t3 ON (t1.f1 = t3.f3) ; # mixed style JOIN 2, last table of FROM part occurs after ON SELECT t1.f1, t2.f2, t3.f3 FROM t1,t2 JOIN t3 ON (t2.f2 = t3.f3) ; # mixed style JOIN 3, table after JOIN does not occur after ON SELECT t1.f1, t2.f2, t3.f3 FROM t1,t2 JOIN t3 ON (t2.f2 = t1.f1) ;