]> granicus.if.org Git - php/commitdiff
PDO MySQL: Use correct type when setting INT_AND_FLOAT_NATIVE
authorNikita Popov <nikita.ppv@gmail.com>
Thu, 17 Dec 2020 17:49:44 +0000 (18:49 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Thu, 17 Dec 2020 17:50:24 +0000 (18:50 +0100)
mysqlnd expects this to be an unsigned int, not a bool.

ext/pdo_mysql/mysql_driver.c

index 0523b81faf0bf358498421636f1a1730368b8aeb..830104952a9c3567e96c8f049fee76dfb0cdd98b 100644 (file)
@@ -827,7 +827,7 @@ static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options)
        }
 
 #ifdef PDO_USE_MYSQLND
-       bool int_and_float_native = true;
+       unsigned int int_and_float_native = 1;
        if (mysql_options(H->server, MYSQLND_OPT_INT_AND_FLOAT_NATIVE, (const char *) &int_and_float_native)) {
                pdo_mysql_error(dbh);
                goto cleanup;