| Bug #26186 | delete order by, sometimes accept unknown column | ||
|---|---|---|---|
| Submitted: | 8 Feb 2007 15:53 | Modified: | 4 Apr 2007 6:33 |
| Reporter: | Martin Friebe (Gold Quality Contributor) (SCA) | ||
| Status: | Closed | ||
| Category: | Server | Severity: | S3 (Non-critical) |
| Version: | 4.1.22, 5.0.33, 5.0.34 | OS: | Any (*) |
| Assigned to: | Georgi Kodinov | Target Version: | |
| Tags: | delete, order by, qc | ||
[8 Feb 2007 15:53]
Martin Friebe
[19 Feb 2007 14:38]
Miguel Solorzano
Thank you for the bug report. Verified as described.
[23 Feb 2007 17:50]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/20472 ChangeSet@1.2419, 2007-02-23 18:49:41+02:00, gkodinov@macbook.gmz +3 -0 Bug #26186: When handling DELETE ... FROM if there is no condition it is internally transformed to TRUNCATE for more efficient execution by the storage handler. The check for validity of the optional ORDER BY clause is done after the check for the above optimization and will not be performed if the optimization can be applied. Moved the validity check for ORDER BY before the optimization so it performed regardless of the optimization.
[31 Mar 2007 10:39]
Bugs System
Pushed into 5.1.18-beta
[31 Mar 2007 10:44]
Bugs System
Pushed into 5.0.40
[4 Apr 2007 6:33]
Paul DuBois
Noted in 5.0.40, 5.1.18 changelogs. For DELETE FROM tbl_name ORDER BY col_name (with no WHERE or LIMIT clause), the server did not check whether col_name was a valid column in the table.
