Bug #79226 | Order by in where clause doesn't cause error | ||
---|---|---|---|
Submitted: | 11 Nov 2015 10:08 | Modified: | 11 Nov 2015 15:12 |
Reporter: | Jeff Ulrich | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: DML | Severity: | S3 (Non-critical) |
Version: | 5.6.21 | OS: | Ubuntu |
Assigned to: | CPU Architecture: | Any | |
Tags: | order by, where clause |
[11 Nov 2015 10:08]
Jeff Ulrich
[11 Nov 2015 15:12]
MySQL Verification Team
Hello Mr. Ulrich, You have not been quite clear in what you request here, but I think I know what you are talking about. You are expecting that in the following ORDER clause: order by i.id and i.isactive=1 and w.isactive=1 your get a syntax error after : and i.isactive=1 and w.isactive=1 because it seems that WHERE clause is continuing in the ORDER clause. Am I right ??? Well, this is not a bug because, the entire ORDER clause, designed as above, is treated as one big expression. Hence, the results are ordered by a big clause. As a consequence , your results with not be ordered by i.id column, but by a much more narrow sorting criteria. This is in accordance by current SQL standards.