mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Remove unnecessary more_results() checks
Just calling next_result() is sufficient.
This commit is contained in:
parent
a073b0218c
commit
ef342b0730
1 changed files with 1 additions and 17 deletions
|
@ -363,9 +363,6 @@ static int pdo_mysql_stmt_next_rowset(pdo_stmt_t *stmt) /* {{{ */
|
|||
|
||||
#ifdef PDO_USE_MYSQLND
|
||||
if (!H->emulate_prepare) {
|
||||
if (!mysqlnd_stmt_more_results(S->stmt)) {
|
||||
PDO_DBG_RETURN(0);
|
||||
}
|
||||
if (mysqlnd_stmt_next_result(S->stmt)) {
|
||||
pdo_mysql_error_stmt(stmt);
|
||||
PDO_DBG_RETURN(0);
|
||||
|
@ -375,25 +372,12 @@ static int pdo_mysql_stmt_next_rowset(pdo_stmt_t *stmt) /* {{{ */
|
|||
}
|
||||
#endif
|
||||
|
||||
if (!mysql_more_results(H->server)) {
|
||||
/* No more results */
|
||||
PDO_DBG_RETURN(0);
|
||||
}
|
||||
#ifdef PDO_USE_MYSQLND
|
||||
if (mysql_next_result(H->server) == FAIL) {
|
||||
if (mysql_next_result(H->server)) {
|
||||
pdo_mysql_error_stmt(stmt);
|
||||
PDO_DBG_RETURN(0);
|
||||
} else {
|
||||
PDO_DBG_RETURN(pdo_mysql_fill_stmt_from_result(stmt));
|
||||
}
|
||||
#else
|
||||
if (mysql_next_result(H->server) > 0) {
|
||||
pdo_mysql_error_stmt(stmt);
|
||||
PDO_DBG_RETURN(0);
|
||||
} else {
|
||||
PDO_DBG_RETURN(pdo_mysql_fill_stmt_from_result(stmt));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue