mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Fix [-Wundef] warning in PDO MySQL extension
This commit is contained in:
parent
db7dc2fa2f
commit
c932cc841a
4 changed files with 24 additions and 24 deletions
|
@ -32,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)
|
||||
|
@ -224,7 +224,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));
|
||||
|
@ -444,7 +444,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) {
|
||||
|
@ -577,7 +577,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
|
||||
|
@ -610,7 +610,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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue