Bug #19632 syntax error while parsing selects with implicit inner join
Submitted: 9 May 2006 10:52 Modified: 9 May 2006 12:36
Reporter: Alexander Ekzhanov Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.20 OS:Linux (linux)
Assigned to: CPU Architecture:Any

[9 May 2006 10:52] Alexander Ekzhanov
Description:
select with mixed implicit inner joins and outer joins causes syntax error to be reported. Example:
SELECT a.x,b.y,c.z FROM a,b LEFT JOIN c ON (c.x=a.x) ...
reports "Unknown column a.x" error. 

I had no problem with this syntax using versions 3.23 and 4.x of MySQL.

The following syntax variants work without errors: 
SELECT a.x,b.y,c.z FROM a INNER JOIN b LEFT JOIN c ON (c.x=a.x) ...
SELECT a.x,b.y,c.z FROM (a,b) LEFT JOIN c ON (c.x=a.x) ...

How to repeat:
Try to execute above example on any database from any client.

Suggested fix:
restore previous behaviour
[9 May 2006 12:36] MySQL Verification Team
Thank you for the bug report.
Please see Join Processing Changes in MySQL 5.0.12 on

http://dev.mysql.com/doc/refman/5.0/en/join.html

Where you will find why: SELECT a.x,b.y,c.z FROM (a,b) LEFT JOIN c ON (c.x=a.x) ... works and not SELECT a.x,b.y,c.z FROM a,b LEFT JOIN c ON (c.x=a.x) ...