Fix for bug #15936: "round" differs on Windows to Unix
Both of our own implementations of rint(3) were inconsistent with the most common behavior of rint() on those platforms that have it: round to nearest, break ties by rounding to nearest even. Fixed by leaving just one implementation of rint() in our source tree, and changing its behavior to match the most common native implementations on other platforms. configure.in: Added checks for fenv.h and fesetround(). include/config-win.h: Removed the incorrect implementation of rint() for Windows. include/my_global.h: Added an rint() implementation for platforms that do not have it. mysql-test/r/func_math.result: Added a test case for bug #15936. mysql-test/t/func_math.test: Added a test case for bug #15936. sql/mysqld.cc: Explicitly set the FPU rounding mode with fesetround().
Showing
Please register or sign in to comment