diff options
author | Keyur Govande <keyur@php.net> | 2014-08-15 23:06:55 +0000 |
---|---|---|
committer | Keyur Govande <keyur@php.net> | 2014-08-15 23:06:55 +0000 |
commit | 7bfe9bf95122b75253b73c86f64a1c240189c084 (patch) | |
tree | 63db7bacba7721fed1543d2b301f69c1f678692f /sapi/apache2handler/php_functions.c | |
parent | 35f32637b08ca6397829138ed45a0768f592f262 (diff) | |
parent | 4e2c01617f207c039881f635d3beb77eff0d9669 (diff) | |
download | php-git-7bfe9bf95122b75253b73c86f64a1c240189c084.tar.gz |
Merge branch 'pull-request/772' into PHP-5.4
* pull-request/772:
Fix failing tests
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