Bug #35071 | DOUBLE to DECIMAL conversion gives different results on Windows and Linux | ||
---|---|---|---|
Submitted: | 5 Mar 2008 9:38 | Modified: | 20 Jul 2017 8:25 |
Reporter: | Stefan Hinz | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Data Types | Severity: | S3 (Non-critical) |
Version: | 5.0,5.1 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[5 Mar 2008 9:38]
Stefan Hinz
[2 Oct 2008 13:32]
Konstantin Osipov
Alexey, shouldn't this be closed now?
[2 Oct 2008 13:46]
Alexey Kopytov
As the original report says, this bug does not exist in 6.0, but it is still present in 5.0/5.1.
[6 Aug 2009 3:02]
Ross McFarland
see this bug i found and recently fixed in drizzle, same problem applies here and likely is the cause of the differences being seen: https://bugs.launchpad.net/drizzle/+bug/408694 it's a mis-use of the new dtoa function, passing in the buffer size as ndigits rather than the maximum number of digits to 'print' (e.g. precision.) dtoa.c:224 is res= dtoa(x, 4, type == MY_GCVT_ARG_DOUBLE ? width : min(width, FLT_DIG), &decpt, &sign, &end, buf, sizeof(buf)); and should be: res= dtoa(x, 4, type == MY_GCVT_ARG_DOUBLE ? min(width, DBL_DIG) : min(width, FLT_DIG), &decpt, &sign, &end, buf, sizeof(buf)); patch is the first piece of the following, the test problems may not apply. https://code.launchpad.net/~rwmcfa1/drizzle/fix-bug408694 -rm
[6 Aug 2009 3:03]
Ross McFarland
re-read comments and see that this particular bug doesn't apply to 6.0, regardless the problem i pointed out does. i'll create a new bug for it...
[20 Jul 2017 7:58]
Alexey Kopytov
I believe this bug has been fixed by https://github.com/mysql/mysql-server/commit/f02525b and thus, does not exist as of MySQL 5.5.
[20 Jul 2017 8:25]
Stefan Hinz
Posted by developer: Per the following comment, this bug seems to have been fixed. Closing this bug report. [20 Jul 7:58] Alexey Kopytov <aleksei.kopytov@caviumnetworks.com> I believe this bug has been fixed by https://github.com/mysql/mysql-server/commit/f02525b and thus, does not exist as of MySQL 5.5.