| Bug #39950 | Ordering by constants ingore subseqent conditions | ||
|---|---|---|---|
| Submitted: | 9 Oct 2008 10:31 | Modified: | 31 Oct 2008 14:59 |
| Reporter: | Colin Guthrie | Email Updates: | |
| Status: | Not a Bug | Impact on me: | |
| Category: | MySQL Server: Optimizer | Severity: | S3 (Non-critical) |
| Version: | 5.0.67 | OS: | Any (Mandriva packages 2009.0, but also MySQL packages going back to 5.0.51a (at least)) |
| Assigned to: | CPU Architecture: | Any | |
[9 Oct 2008 10:31]
Colin Guthrie
[31 Oct 2008 14:59]
Susanne Ebrecht
Many thanks for writing a bug report. The sorting works correct here. Select a,b,c from t order by 1; means all will be ordered by "a" because it is the first argument in select list. Order by 2 would mean here that all will be ordered by "b" and so on. This rule is given by SQL standard. select * from order by 1, id desc; is the same as select id from orderby order by id asc, id desc This is not a bug this is an expected behaviour.
