Bug #62584 | PI()+0.000000000000000000 returns differenct value between 5.1 and 5.5. | ||
---|---|---|---|
Submitted: | 30 Sep 2011 9:31 | Modified: | 24 Jan 2012 10:23 |
Reporter: | Meiji KIMURA | Email Updates: | |
Status: | Won't fix | Impact on me: | |
Category: | MySQL Server: DML | Severity: | S3 (Non-critical) |
Version: | 5.5.17 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | regression |
[30 Sep 2011 9:31]
Meiji KIMURA
[30 Sep 2011 12:36]
Valeriy Kravchuk
Thank you for the problem report. Verified just as described: macbook-pro:5.5 openxs$ bin/mysql -uroot test Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 9 Server version: 5.5.17-debug-log Source distribution Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> select pi(); +----------+ | pi() | +----------+ | 3.141593 | +----------+ 1 row in set (0.09 sec) mysql> select pi()+0.000000000000000000; +---------------------------+ | pi()+0.000000000000000000 | +---------------------------+ | 3.141592653589793000 | +---------------------------+ 1 row in set (0.06 sec)
[24 Jan 2012 10:23]
Tor Didriksen
5.1 was wrong, 5.5 is correct, it only prints 16 (== DBL_DIG + 1) significant digits with 19 digits of precision, the result would be 3.141592653589793238 See also "Incompatible Change: The server now includes dtoa, a library for conversion..." http://dev.mysql.com/doc/refman/5.5/en/news-5-5-3.html