Bug #27848 | rollup in union part causes error with order of union | ||
---|---|---|---|
Submitted: | 16 Apr 2007 11:59 | Modified: | 18 Jul 2008 15:51 |
Reporter: | Martin Friebe (Gold Quality Contributor) (OCA) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 5.0.40 4.1.23 | OS: | Any |
Assigned to: | Igor Babaev | CPU Architecture: | Any |
Tags: | Contribution, order by, rollup, UNION |
[16 Apr 2007 11:59]
Martin Friebe
[16 Apr 2007 12:00]
Martin Friebe
proposal for a patch and tests
Attachment: union_rollup.patch (text/x-patch), 2.56 KiB.
[16 Apr 2007 22:59]
Sveta Smirnova
Thank you for the report. Verified as described.
[14 Dec 2007 21:40]
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/40037 ChangeSet@1.2583, 2007-12-14 13:42:46-08:00, igor@olga.mysql.com +3 -0 Fixed bug #27848. In a union without braces, the order by at the end is applied to the overall union. It therefore should not interfere with the individual select parts of the union. Fixed by changing our parser rules appropriately.
[11 Jan 2008 12:18]
Bugs System
Pushed into 6.0.5-alpha
[11 Jan 2008 12:21]
Bugs System
Pushed into 5.1.23-rc
[11 Jan 2008 12:22]
Bugs System
Pushed into 5.0.56
[18 Jul 2008 15:51]
Paul DuBois
Noted in 5.0.56, 5.1.23, 6.0.5 changelogs. An ORDER BY at the end of a UNION affected individual SELECT statements rather than the overall query result.