summaryrefslogtreecommitdiff
path: root/sapi/apache2handler/php_functions.c
diff options
context:
space:
mode:
authorKeyur Govande <keyur_govande@yahoo.com>2014-08-14 18:19:56 +0000
committerKeyur Govande <keyur_govande@yahoo.com>2014-08-14 18:19:56 +0000
commitc044164a96553668cc6c4ae1eb32f18219308851 (patch)
treeb43d8221a56ca7b6c3aa39a41cca8cc256cb289b /sapi/apache2handler/php_functions.c
parentaeb633543bbd571d7fb440d54ae3b0f1a4dfece7 (diff)
downloadphp-git-c044164a96553668cc6c4ae1eb32f18219308851.tar.gz
Patch for bug #67839 (mysqli does not handle 4-byte floats correctly)
Before the patch, a value of 9.99 in a FLOAT column came out of mysqli as 9.9998998641968. This is because it would naively cast a 4-byte float into PHP's internal 8-byte double. To fix this, with GCC we use the built-in decimal support to "up-convert" the 4-byte float to a 8-byte double. When that is not available, we fall back to converting the float to a string and then converting the string to a double. This mimics what MySQL does.
Diffstat (limited to 'sapi/apache2handler/php_functions.c')
0 files changed, 0 insertions, 0 deletions