Bug #14092 | Optimizer requires table aliases to be declared in order | ||
---|---|---|---|
Submitted: | 17 Oct 2005 23:06 | Modified: | 18 Oct 2005 8:39 |
Reporter: | Dave Gullo | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | Mysql 5 RC 1 | OS: | Linux (Linux) |
Assigned to: | CPU Architecture: | Any |
[17 Oct 2005 23:06]
Dave Gullo
[18 Oct 2005 8:39]
Valeriy Kravchuk
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.mysql.com/documentation/ and the instructions on how to report a bug at http://bugs.mysql.com/how-to-report.php Additional info: Please, read the manual (http://dev.mysql.com/doc/refman/5.0/en/join.html). It is an intended change in 5.0.12 to become closer to the standard: "Beginning with MySQL 5.0.12, natural joins and joins with USING, including outer join variants, are processed according to the SQL:2003 standard. Redundant output columns specified in USING clauses are eliminated, and output columns are ordered correctly. This means that some queries that appeared to work correctly prior to 5.0.12 must be rewritten to comply with the standard. For example, a query of the form SELECT t1.id,t2.id,t3.id FROM t1,t2 LEFT JOIN t3 ON (t3.id=t1.id) WHERE t1.id=t2.id; will be interpreted in MySQL 5.0.12 and later as SELECT t1.id,t2.id,t3.id FROM t1,( t2 LEFT JOIN t3 ON (t3.id=t1.id) ) WHERE t1.id=t2.id; Such a query must now be written like so: SELECT t1.id,t2.id,t3.id FROM (t1,t2) LEFT JOIN t3 ON (t3.id=t1.id) WHERE t1.id=t2.id;"