Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Won't Fix
-
10.1.19, 10.1.22, 10.1.23
-
Linux RHEL 7.x ; also 6.x
HP 370 server
Cpu: Xeon E5 4620 ; also happens with many others
All versions of mariadb since 10.0 to current 10.1
Description
A linux/gcc (4.4 or 4.8 or 5.3) optimized build fails returning correct correct values for DOUBLE cells.
To repro:
1. make a gcc optimized build; flags -march=native -O3 -mavx -mfpmath=sse -msse2 -msse4 -fomit-frame-pointer -ffast-math
2. Create a table with a single DOUBLE field.
3. Insert a number like 132 bill (132000000000) . Select it back and you will get non numeric output (a ":" or other character will appear in the number returned)
The problem goes away when you build without the -ffast-math flag is not used
The problem appears to be in dtoa.c in strings/
I believe code should work properly, even when --fast-math is passed.
–
As an aside, there are faster publicly available atod and dtoa options (as well as itoa and atoi) compare to the ones mariadb uses. Those could give notable speedup for both server and client code and should be possibly reviewed and considered. See e.g.:
https://github.com/miloyip/dtoa-benchmark