Bug #19631 | count(distinct COL) yields wrong results when group-by key contains a cast | ||
---|---|---|---|
Submitted: | 9 May 2006 10:18 | Modified: | 10 May 2006 11:46 |
Reporter: | Hiroshi Takenaka | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Server | Severity: | S1 (Critical) |
Version: | 5.0.21 | OS: | FreeBSD (FreeBSD) |
Assigned to: | CPU Architecture: | Any |
[9 May 2006 10:18]
Hiroshi Takenaka
[9 May 2006 12:07]
MySQL Verification Team
Thank you for the bug report. Please read: http://dev.mysql.com/doc/refman/5.1/en/problems-with-float.html
[9 May 2006 13:54]
Hiroshi Takenaka
Hmm..., you mean, both 1+0.0 and 2+0.0 are evaluated into the same value '1.0' because of rounding error, and hence that result? If so, why my another query, 'select foo+0.0, sum(bar) ...' returns a expected result, instead of: +---------+----------+ | foo+0.0 | sum(bar) | +---------+----------+ | 1.0 | 6 | +---------+----------+ or alike? AFAIK, rounding errors are not something indeterminate. Two same expressions should give the same result, isn't?
[10 May 2006 11:46]
Hartmut Holzgraefe
Reopened and marked as duplicte of bug #19667