diff options
| author | Keyur Govande <keyur@php.net> | 2015-01-26 21:36:36 +0000 |
|---|---|---|
| committer | Keyur Govande <keyur@php.net> | 2015-01-26 21:36:36 +0000 |
| commit | 6635466bccef32bb34c4834302585860ce111968 (patch) | |
| tree | 5c8b1b34c43f5101519f288b39f534f4a8c5d715 /ext/mysqli/mysqli_api.c | |
| parent | e05993dfa20e934ba99ccd5b2b944a7759126f58 (diff) | |
| parent | 168877bc78376fe7c0e3130c5305c66d2865eb38 (diff) | |
| download | php-git-6635466bccef32bb34c4834302585860ce111968.tar.gz | |
Merge branch 'PHP-5.6'
* PHP-5.6:
Add NEWS
Patch commit d9f85373e32 by moving the float_to_double function to a header file.
Fix for bugs #68114 (Build fails on OS X due to undefined symbols) and #68657 (Reading 4 byte floats with Mysqli and libmysqlclient has rounding errors).
Patch commit d9f85373e32 by moving the float_to_double function to a header file.
Fix for bugs #68114 (Build fails on OS X due to undefined symbols) and #68657 (Reading 4 byte floats with Mysqli and libmysqlclient has rounding errors).
Conflicts:
ext/mysqli/mysqli_api.c
ext/mysqlnd/mysql_float_to_double.h
Diffstat (limited to 'ext/mysqli/mysqli_api.c')
| -rw-r--r-- | ext/mysqli/mysqli_api.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c index 9f6d8220ce..7e6ad66d4d 100644 --- a/ext/mysqli/mysqli_api.c +++ b/ext/mysqli/mysqli_api.c @@ -426,6 +426,17 @@ mysqli_stmt_bind_result_do_bind(MY_STMT *stmt, zval *args, unsigned int argc, un case MYSQL_TYPE_DOUBLE: stmt->result.buf[ofs].type = IS_DOUBLE; + stmt->result.buf[ofs].buflen = sizeof(float); + + stmt->result.buf[ofs].val = (char *)emalloc(sizeof(float)); + bind[ofs].buffer_type = MYSQL_TYPE_FLOAT; + bind[ofs].buffer = stmt->result.buf[ofs].val; + bind[ofs].is_null = &stmt->result.is_null[ofs]; + break; + + case MYSQL_TYPE_DOUBLE: + convert_to_double_ex(args[i]); + stmt->result.buf[ofs].type = IS_DOUBLE; stmt->result.buf[ofs].buflen = sizeof(double); /* allocate buffer for double */ |
