diff options
Diffstat (limited to 'ext/pdo_mysql/mysql_driver.c')
| -rw-r--r-- | ext/pdo_mysql/mysql_driver.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c index 42f148505d..9596bdd04f 100644 --- a/ext/pdo_mysql/mysql_driver.c +++ b/ext/pdo_mysql/mysql_driver.c @@ -1,7 +1,5 @@ /* +----------------------------------------------------------------------+ - | PHP Version 7 | - +----------------------------------------------------------------------+ | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | @@ -34,7 +32,7 @@ #endif #include "zend_exceptions.h" -#if defined(PDO_USE_MYSQLND) +#ifdef PDO_USE_MYSQLND # define pdo_mysql_init(persistent) mysqlnd_init(MYSQLND_CLIENT_NO_FLAG, persistent) #else # define pdo_mysql_init(persistent) mysql_init(NULL) @@ -225,7 +223,7 @@ static int mysql_handle_preparer(pdo_dbh_t *dbh, const char *sql, size_t sql_len if (S->num_params) { S->params_given = 0; -#if defined(PDO_USE_MYSQLND) +#ifdef PDO_USE_MYSQLND S->params = NULL; #else S->params = ecalloc(S->num_params, sizeof(MYSQL_BIND)); @@ -445,7 +443,7 @@ static int pdo_mysql_get_attribute(pdo_dbh_t *dbh, zend_long attr, zval *return_ ZVAL_STRING(return_value, (char *)mysql_get_host_info(H->server)); break; case PDO_ATTR_SERVER_INFO: { -#if defined(PDO_USE_MYSQLND) +#ifdef PDO_USE_MYSQLND zend_string *tmp; if (mysqlnd_stat(H->server, &tmp) == PASS) { @@ -578,7 +576,7 @@ static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options) |CLIENT_MULTI_RESULTS #endif ; -#if defined(PDO_USE_MYSQLND) +#ifdef PDO_USE_MYSQLND size_t dbname_len = 0; size_t password_len = 0; #endif @@ -611,7 +609,7 @@ static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options) pdo_mysql_error(dbh); goto cleanup; } -#if defined(PDO_USE_MYSQLND) +#ifdef PDO_USE_MYSQLND if (dbh->is_persistent) { mysqlnd_restart_psession(H->server); } @@ -795,12 +793,10 @@ static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options) #endif } -#ifdef PDO_MYSQL_HAS_CHARSET if (vars[0].optval && mysql_options(H->server, MYSQL_SET_CHARSET_NAME, vars[0].optval)) { pdo_mysql_error(dbh); goto cleanup; } -#endif dbname = vars[1].optval; host = vars[2].optval; |
