com php-src: Merge branch 'PHP-5.6': ext/mysqli/mysqli_api. c
| From: | Keyur Govande | Date: | Mon, 26 Jan 2015 21:36:36 +0000 |
| Subject: | com php-src: Merge branch 'PHP-5.6': ext/mysqli/mysqli_api. c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-84378@lists.php.net to get a copy of this message | ||
Commit: 6635466bccef32bb34c4834302585860ce111968
Author: Keyur Govande <keyur@php.net> Mon, 26 Jan 2015 21:36:36 +0000
Parents: e05993dfa20e934ba99ccd5b2b944a7759126f58 168877bc78376fe7c0e3130c5305c66d2865eb38
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=6635466bccef32bb34c4834302585860ce111968
Log:
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
Bugs:
https://bugs.php.net/68114
https://bugs.php.net/68657
Changed paths:
MM ext/mysqli/mysqli_api.c
Diff:
diff --cc ext/mysqli/mysqli_api.c
index 9f6d822,72c029e..7e6ad66
--- a/ext/mysqli/mysqli_api.c
+++ b/ext/mysqli/mysqli_api.c
@@@ -415,17 -415,19 +415,28 @@@ mysqli_stmt_bind_result_do_bind(MY_STM
switch (col_type) {
case MYSQL_TYPE_FLOAT:
- convert_to_double_ex(args[i]);
+ 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:
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 */