From: Nikita Popov Date: Wed, 16 Dec 2020 09:53:48 +0000 (+0100) Subject: Merge branch 'PHP-7.4' into PHP-8.0 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1a66d64717d08e9b7f7c9328be673018cfe28c11;p=php Merge branch 'PHP-7.4' into PHP-8.0 * PHP-7.4: Fixed bug #67983 --- 1a66d64717d08e9b7f7c9328be673018cfe28c11 diff --cc NEWS index cb8af57a7b,8dcb2e94f2..c75d6e6549 --- 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 33a000d9a6,216f420698..1fc2941e66 --- 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; }