]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-7.4' into PHP-8.0
authorNikita Popov <nikita.ppv@gmail.com>
Wed, 16 Dec 2020 09:53:48 +0000 (10:53 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Wed, 16 Dec 2020 09:53:48 +0000 (10:53 +0100)
* PHP-7.4:
  Fixed bug #67983

1  2 
NEWS
ext/mysqlnd/mysqlnd_wireprotocol.c

diff --cc NEWS
index cb8af57a7b2ab8377dafc12fd605ac351f1d042b,8dcb2e94f2fdc82e9d94ffb82407039202594b43..c75d6e65495496209e3b6595b52bf90d0a74f02e
--- 1/NEWS
--- 2/NEWS
+++ b/NEWS
@@@ -5,9 -5,15 +5,13 @@@ PH
  - Core:
    . Fixed bug #80523 (bogus parse error on >4GB source code). (Nikita)
  
 -07 Jan 2021, PHP 7.4.14
+ - MySQLi:
+   . Fixed bug #67983 (mysqlnd with MYSQLI_OPT_INT_AND_FLOAT_NATIVE fails to
+     interpret bit columns). (Nikita)
 +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)
index 33a000d9a6b20fe491491950c80a5f8f6e3d231d,216f42069875f168ebfc9ef6108218c69933ee28..1fc2941e663e39488c216b63d446aa6d1556db3a
@@@ -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;
                }