com php-src: Merge branch 'PHP-7.4' into PHP-8.0: NEWS ext/mysqlnd/mysqlnd_wireprotocol.c
| From: | Nikita Popov | Date: | Wed, 16 Dec 2020 09:53:48 +0000 |
| Subject: | com php-src: Merge branch 'PHP-7.4' into PHP-8.0: NEWS ext/mysqlnd/mysqlnd_wireprotocol.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-114480@lists.php.net to get a copy of this message | ||
Commit: 1a66d64717d08e9b7f7c9328be673018cfe28c11
Author: Nikita Popov <nikita.ppv@gmail.com> Wed, 16 Dec 2020 10:53:48 +0100
Parents: f6bd3dfdbcc0d8f4f7733560034e735865083c1a 315f3f8dc9b3ba3639c9284301933286fc99a825
Branches: PHP-8.0 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1a66d64717d08e9b7f7c9328be673018cfe28c11
Log:
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
Fixed bug #67983
Bugs:
https://bugs.php.net/67983
Changed paths:
MM NEWS
MM ext/mysqlnd/mysqlnd_wireprotocol.c
Diff:
diff --cc NEWS
index cb8af57a7b2,8dcb2e94f2f..c75d6e65495
--- a/NEWS
+++ b/NEWS
@@@ -5,9 -5,15 +5,13 @@@ PH
- Core:
. Fixed bug #80523 (bogus parse error on >4GB source code). (Nikita)
+ - MySQLi:
+ . Fixed bug #67983 (mysqlnd with MYSQLI_OPT_INT_AND_FLOAT_NATIVE fails to
+ interpret bit columns). (Nikita)
+
-07 Jan 2021, PHP 7.4.14
+07 Jan 2021, PHP 8.0.1
- Core:
- . Fixed bug #74558 (Can't rebind closure returned by Closure::fromCallable()).
- (cmb)
. Fixed bug #80345 (PHPIZE configuration has outdated PHP_RELEASE_VERSION).
(cmb)
. Fixed bug #72964 (White space not unfolded for CC/Bcc headers). (cmb)
diff --cc ext/mysqlnd/mysqlnd_wireprotocol.c
index 33a000d9a6b,216f4206987..1fc2941e663
--- a/ext/mysqlnd/mysqlnd_wireprotocol.c
+++ b/ext/mysqlnd/mysqlnd_wireprotocol.c
@@@ -1649,29 -1681,14 +1669,10 @@@ php_mysqlnd_rowp_read_text_protocol_aux
*(p + len) = '\0';
ZVAL_DOUBLE(current_field, atof((char *) p));
*(p + len) = save;
- } else
+ }
#endif /* MYSQLND_STRING_TO_INT_CONVERSION */
- if (fields_metadata[i]..type == MYSQL_TYPE_BIT) {
- /*
- BIT fields are specially handled. As they come as bit mask, they have
- to be converted to human-readable representation.
- */
- ps_fetch_from_1_to_8_bytes(current_field, &(fields_metadata[i]), 0, (const zend_uchar **)
&p, len);
- /*
- We have advanced in ps_fetch_from_1_to_8_bytes. We should go back because
- later in this function there will be an advancement.
- */
- p -= len;
- if (Z_TYPE_P(current_field) == IS_LONG && !as_int_or_float) {
- /* we are using the text protocol, so convert to string */
- char tmp[22];
- const size_t tmp_len = sprintf((char *)&tmp, ZEND_ULONG_FMT, Z_LVAL_P(current_field));
- ZVAL_STRINGL(current_field, tmp, tmp_len);
- } else if (Z_TYPE_P(current_field) == IS_STRING) {
- /* nothing to do here, as we want a string and ps_fetch_from_1_to_8_bytes() has given us one
*/
- }
- else if (len == 0) {
- ZVAL_EMPTY_STRING(current_field);
- } else if (len == 1) {
- ZVAL_INTERNED_STR(current_field, ZSTR_CHAR((zend_uchar)*(char *)p));
-- } else {
- ZVAL_STRINGL(current_field, (char *)p, len);
++ else {
+ ZVAL_STRINGL_FAST(current_field, (char *)p, len);
}
p += len;
}