Bug #30324 Grouping queries with COUNT(DISTINCT bit column) return wrong results
| Submitted: | 8 Aug 2007 23:31 | Modified: | 23 Oct 2007 16:34 |
|---|---|---|---|
| Reporter: | Igor Babaev | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server: Optimizer | Severity: | S2 (Serious) |
| Version: | 5.0-bk, 5.1-bk | OS: | Any |
| Assigned to: | Sergey Petrunya | CPU Architecture: | Any |
[8 Aug 2007 23:31]
Igor Babaev
[8 Aug 2007 23:57]
MySQL Verification Team
Thank you for the bug report.
[8 Sep 2007 16:25]
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/33963 ChangeSet@1.2513, 2007-09-08 20:23:52+04:00, sergefp@mysql.com +3 -0 BUG#30324: Grouping queries with COUNT(DISTINCT bit column) return wrong results - The bug was caused by COUNT(DISTINCT ...) code using Unique object in a way that assumed that BIT(N) column occupies a continous space in temp_table->record[0] buffer. - The fix is to make COUNT(DISTINCT ...) code instruct create_tmp_table to create temporary table with column of type BIGINT, not BIT(N).
[14 Sep 2007 10:54]
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/34262 ChangeSet@1.2513, 2007-09-14 14:53:13+04:00, sergefp@mysql.com +3 -0 BUG#30324: Grouping queries with COUNT(DISTINCT bit column) return wrong results - The bug was caused by COUNT(DISTINCT ...) code using Unique object in a way that assumed that BIT(N) column occupies a contiguous space in temp_table->record[0] buffer. - The fix is to make COUNT(DISTINCT ...) code instruct create_tmp_table to create temporary table with column of type BIGINT, not BIT(N).
[24 Sep 2007 8:31]
Bugs System
Pushed into 5.0.50
[24 Sep 2007 8:35]
Bugs System
Pushed into 5.1.23-beta
[23 Oct 2007 16:34]
Paul DuBois
Noted in 5.0.50, 5.1.23 changelogs. Queries that had a GROUP BY clause and selected COUNT(DISTINCT bit_column) returned incorrect results.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.057 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.