| Bug #28980 | ROUND(x,y) returns different results for same literal and int column values as y | ||
|---|---|---|---|
| Submitted: | 8 Jun 2007 19:00 | Modified: | 15 Jun 2007 15:32 |
| Reporter: | Valeriy Kravchuk | ||
| Status: | Closed | ||
| Category: | Server: Types | Severity: | S1 (Critical) |
| Version: | 5.0.44-BK, 5.0.22 | OS: | Linux |
| Assigned to: | Igor Babaev | Target Version: | |
[8 Jun 2007 19:00]
Valeriy Kravchuk
[13 Jun 2007 7:01]
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/28624 ChangeSet@1.2533, 2007-06-12 22:05:01-07:00, igor@olga.mysql.com +3 -0 Fixed bug #28980: the result of ROUND(<decimal expr>,<int column>) was erroneously converted to double, while the result of ROUND(<decimal expr>, <int literal>) was preserved as decimal. As a result of such a conversion the value of ROUND(D,A) could differ from the value of ROUND(D,val(A)) if D was a decimal expression. Now the result of the ROUND function is never converted to double if the first argument is decimal.
[13 Jun 2007 18:29]
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/28683 ChangeSet@1.2533, 2007-06-13 09:32:36-07:00, igor@olga.mysql.com +3 -0 Fixed bug #28980: the result of ROUND(<decimal expr>,<int column>) was erroneously converted to double, while the result of ROUND(<decimal expr>, <int literal>) was preserved as decimal. As a result of such a conversion the value of ROUND(D,A) could differ from the value of ROUND(D,val(A)) if D was a decimal expression. Now the result of the ROUND function is never converted to double if the first argument is decimal.
[14 Jun 2007 21:00]
Bugs System
Pushed into 5.0.44
[14 Jun 2007 21:00]
Bugs System
Pushed into 5.1.20-beta
[15 Jun 2007 15:32]
Peter Lavin
Thank you for your bug report. This issue has been committed to our source repository of
that product and will be incorporated into the next release.
If necessary, you can access the source repository and build the latest available version,
including the bug fix. More information about accessing the source trees is available at
http://dev.mysql.com/doc/en/installing-source.html
Added to the changelogs for 5.0.44 and 5.1.20-beta.
