summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-12-09 16:02:49 +0100
committerNikita Popov <nikita.ppv@gmail.com>2020-12-09 16:16:17 +0100
commitef342b0730d15e2e38ab527659fd0091023854e9 (patch)
treefab296c0987179c9bc2935ffa8d3b184095c47a5
parenta073b0218cd9a894299600f82cfc3bfe8297a31d (diff)
downloadphp-git-ef342b0730d15e2e38ab527659fd0091023854e9.tar.gz
Remove unnecessary more_results() checks
Just calling next_result() is sufficient.
-rw-r--r--ext/pdo_mysql/mysql_statement.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/ext/pdo_mysql/mysql_statement.c b/ext/pdo_mysql/mysql_statement.c
index 68bfcd4eb4..1752b7f8a9 100644
--- a/ext/pdo_mysql/mysql_statement.c
+++ b/ext/pdo_mysql/mysql_statement.c
@@ -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) {
- 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) {
+ 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));
}
-#endif
}
/* }}} */