Bug #59839 | Aggregation followed by subquery yields wrong result | ||
---|---|---|---|
Submitted: | 31 Jan 2011 11:15 | Modified: | 28 Feb 2011 20:42 |
Reporter: | Martin Hansson | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S3 (Non-critical) |
Version: | all | OS: | Any |
Assigned to: | Martin Hansson | CPU Architecture: | Any |
[31 Jan 2011 11:15]
Martin Hansson
[31 Jan 2011 11:19]
Martin Hansson
Expected Result
Attachment: bug.result (, text), 895 bytes.
[9 Feb 2011 9:58]
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/130814 3587 Martin Hansson 2011-02-09 Bug#59839: Aggregation followed by subquery yields wrong result The loop that was looping over subqueries' references to outer field used a local boolean variable to tell whether the field was grouped or not. But the implementor failed to reset the variable after each iteration. Thus a field that was not directly aggregated appeared to be. Fixed by resetting the variable upon each new iteration.
[28 Feb 2011 20:42]
Paul DuBois
Noted in 5.1.57, 5.5.11, 5.6.2 changelogs. Aggregation followed by a subquery could produce an incorrect result. CHANGESET - http://lists.mysql.com/commits/131611