Bug #15177 already reported & fixed bug still existent!!
Submitted: 23 Nov 2005 9:23 Modified: 23 Nov 2005 17:19
Reporter: Corin Langosch Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.0.16 OS:Linux (linux debian)
Assigned to: MySQL Verification Team CPU Architecture:Any

[23 Nov 2005 9:23] Corin Langosch
Description:
reported bug #13832 is NOT fixed in 5.0.16 as documented. the bug still occurs whithin a lot of queries. 

i mark it as critical as normal software like "confixx" does not work at all because of this bug.

How to repeat:
example query

SELECT ml.mail_id,m.subject,m.create_stamp,ml.flags&1 AS red,ml.flags&2 AS replied,m.sender_id,f_u.user AS f_user FROM mail_mails AS m,mail_l AS ml,mail_folders AS f LEFT JOIN user_copy AS f_u ON (f_u.id=m.sender_id) WHERE f.id=1 AND f.owner_id=1 AND f.id=ml.folder_id AND m.id=ml.mail_id ORDER BY ml.mail_id DESC LIMIT 0,10

error:
Unknown column 'm.sender_id' in 'on clause'

Suggested fix:
works fine using latest 4.1.x 
bug present in 5.0.15 and 5.0.16, please see other bug-report mentioned above
[23 Nov 2005 17:19] MySQL Verification Team
Please see:

http://dev.mysql.com/doc/refman/5.0/en/news-5-0-12.html

#

Incompatible change: Beginning with MySQL 5.0.12, natural joins and joins with USING,
including outer join variants, are processed according to the SQL:2003 standard.
The changes include elimination of redundant output columns for NATURAL joins and joins
specified with a USING clause and proper ordering of output columns. (Bug #6136, Bug #6276,
Bug #6489, Bug #6495, Bug #6558, Bug #9067, Bug #9978, Bug #10428, Bug #10646, Bug #10972.)
The precedence of the comma operator also now is lower compared to JOIN. (Bug #4789,
Bug #12065, Bug #13551.)

These changes make MySQL more compliant with standard SQL. However, they can result in
different output columns for some joins. Also, some queries that appeared to work correctly
prior to 5.0.12 must be rewritten to comply with the standard. For details about the scope
of the changes and examples that show what query rewrites are necessary, 
see Section 13.2.7.1, “JOIN Syntax”.

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