Merge branch 'PHP-7.1' into PHP-7.2

This commit is contained in:
Darek Slusarczyk 2019-02-11 18:08:21 +01:00
commit 83d2bc9b6d
18 changed files with 149 additions and 6 deletions

View file

@ -502,6 +502,12 @@ static int pdo_mysql_get_attribute(pdo_dbh_t *dbh, zend_long attr, zval *return_
case PDO_MYSQL_ATTR_MAX_BUFFER_SIZE:
ZVAL_LONG(return_value, H->max_buffer_size);
break;
#else
case PDO_MYSQL_ATTR_LOCAL_INFILE:
ZVAL_BOOL(
return_value,
(H->server->data->options->flags & CLIENT_LOCAL_FILES) == CLIENT_LOCAL_FILES);
break;
#endif
default:
@ -785,6 +791,15 @@ static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options)
CLIENT_SSL_DONT_VERIFY_SERVER_CERT;
}
}
#endif
} else {
#if defined(MYSQL_OPT_LOCAL_INFILE) || defined(PDO_USE_MYSQLND)
// in case there are no driver options disable 'local infile' explicitly
zend_long local_infile = 0;
if (mysql_options(H->server, MYSQL_OPT_LOCAL_INFILE, (const char *)&local_infile)) {
pdo_mysql_error(dbh);
goto cleanup;
}
#endif
}