According to the MySQL 5.5 manual [1], comma-separated table references in joins
should be wrapped in parenthesis or JOIN should be used instead of comma.
Further explanation from the manual: The ON clause takes precedence since
a couple of versions so the operands for the ON clause change:
SELECT * FROM t1, t2 JOIN t3 ON (t1.i1 = t3.i3);
The operands for the ON are t2 and t3. t1.i1 is not known at this point.
[1] https://dev.mysql.com/doc/refman/5.5/en/join.html