Bug #10633 | Precision math: round(x,d) causes truncation if d > 30 | ||
---|---|---|---|
Submitted: | 13 May 2005 20:03 | Modified: | 3 Apr 2020 16:59 |
Reporter: | Peter Gulutzan | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Documentation | Severity: | S3 (Non-critical) |
Version: | 5.0.6-beta-debug | OS: | Linux (SUSE 9.2) |
Assigned to: | Jon Stephens | CPU Architecture: | Any |
[13 May 2005 20:03]
Peter Gulutzan
[13 May 2005 20:10]
MySQL Verification Team
Thank you for the bug report.
[15 Jun 2005 10:00]
Alexey Botchkov
Presently we can't support more than 30 digits after the decimal point. Should be fixed in 5.1.
[29 Sep 2008 21:53]
Konstantin Osipov
No reason to keep this not fixed. We should either return an error that 35 digits are not supported, or round correctly.
[9 Nov 2008 14:32]
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/58284 2709 Alexey Botchkov 2008-11-09 Bug#10633 Precision math: round(x,d) causes truncation if d > 30 result of the 'DECIMAL' operation was limited with MAX_SCALE. But the MAX_SCAL only limits fields of tables, not the 'decimal' engine itself. So the limit was changed to MAX_PRECISION. per-file comments: mysql-test/r/func_math.result Bug#10633 Precision math: round(x,d) causes truncation if d > 30 test result fixed mysql-test/r/type_decimal.result Bug#10633 Precision math: round(x,d) causes truncation if d > 30 test result fixed mysql-test/r/type_newdecimal.result Bug#10633 Precision math: round(x,d) causes truncation if d > 30 test result fixed sql/item_func.cc Bug#10633 Precision math: round(x,d) causes truncation if d > 30 scale limit for decimal operation changed with MAX_PRECISION
[13 Nov 2017 0:41]
Federico Razzoli
Still in 8.0.3.
[1 Apr 2020 15:43]
Jon Stephens
This is a documentation issue, assigning to myself for resolution.
[3 Apr 2020 16:59]
Jon Stephens
The limitation is now noted in all current versions of the Manual. Closed.