Bug #20517 | Fixed point vs. Floating numbers with high precision mis-treated. | ||
---|---|---|---|
Submitted: | 17 Jun 2006 10:12 | Modified: | 19 Jul 2006 23:41 |
Reporter: | Robin Johnson | Email Updates: | |
Status: | No Feedback | Impact on me: | |
Category: | MySQL Server: Documentation | Severity: | S2 (Serious) |
Version: | 4.1.20, 5.0.22 | OS: | Linux (Linux) |
Assigned to: | Assigned Account | CPU Architecture: | Any |
[17 Jun 2006 10:12]
Robin Johnson
[19 Jun 2006 8:19]
Robin Johnson
Possibly of interest, I posted on my blog a request for users of other major RDBMS systems to run a similar test case, and post their results - It does seem that a lot of other systems have similar issues. http://robbat2.livejournal.com/200033.html
[19 Jun 2006 10:33]
Sveta Smirnova
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.mysql.com/documentation/ and the instructions on how to report a bug at http://bugs.mysql.com/how-to-report.php Additional info: Please, read carefully documentation about Precision Math and NUMERIC values: http://dev.mysql.com/doc/refman/5.0/en/precision-math.html, http://dev.mysql.com/doc/refman/5.0/en/numeric-type-overview.html, http://dev.mysql.com/doc/refman/5.0/en/problems-with-float.html
[19 Jun 2006 22:50]
Robin Johnson
From the documentation that you linked: "As of 5.0.3, MySQL performs DECIMAL operations with a precision of 64 decimal digits, which should solve most common inaccuracy problems when it comes to DECIMAL columns." Yet this is clearly incorrect here: In MySQL 5.0.22: SELECT CAST(0.123456789012345678900123456789E20 AS DECIMAL(30,10)); +-------------------------------------------------------------+ | cast(0.123456789012345678900123456789E20 as decimal(30,10)) | +-------------------------------------------------------------+ | 12345678901234570000.0000000000 | +-------------------------------------------------------------+ Unless 0.123456789012345678900123456789E20 was treated as a floating point number, which is not clear in any of the documentation - Documentation section '9.1.2. Numbers' should indicate which numbers are fixed point, and which numbers are floating point. Alternatively, may I submit a patch that correctly treats 0.123456789012345678900123456789E20 as a fixed point number?
[19 Jun 2006 23:41]
MySQL Verification Team
Hi, "Alternatively, may I submit a patch that correctly treats 0.123456789012345678900123456789E20 as a fixed point number?" Yes please subtmit the patch for our development team to analyze. Thanks in advance.
[20 Jul 2006 23:00]
Bugs System
No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open".