Skip to content

Commit ef342b0

Browse files
committed
Remove unnecessary more_results() checks
Just calling next_result() is sufficient.
1 parent a073b02 commit ef342b0

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

ext/pdo_mysql/mysql_statement.c

+1-17
Original file line numberDiff line numberDiff line change
@@ -363,9 +363,6 @@ static int pdo_mysql_stmt_next_rowset(pdo_stmt_t *stmt) /* {{{ */
363363

364364
#ifdef PDO_USE_MYSQLND
365365
if (!H->emulate_prepare) {
366-
if (!mysqlnd_stmt_more_results(S->stmt)) {
367-
PDO_DBG_RETURN(0);
368-
}
369366
if (mysqlnd_stmt_next_result(S->stmt)) {
370367
pdo_mysql_error_stmt(stmt);
371368
PDO_DBG_RETURN(0);
@@ -375,25 +372,12 @@ static int pdo_mysql_stmt_next_rowset(pdo_stmt_t *stmt) /* {{{ */
375372
}
376373
#endif
377374

378-
if (!mysql_more_results(H->server)) {
379-
/* No more results */
380-
PDO_DBG_RETURN(0);
381-
}
382-
#ifdef PDO_USE_MYSQLND
383-
if (mysql_next_result(H->server) == FAIL) {
384-
pdo_mysql_error_stmt(stmt);
385-
PDO_DBG_RETURN(0);
386-
} else {
387-
PDO_DBG_RETURN(pdo_mysql_fill_stmt_from_result(stmt));
388-
}
389-
#else
390-
if (mysql_next_result(H->server) > 0) {
375+
if (mysql_next_result(H->server)) {
391376
pdo_mysql_error_stmt(stmt);
392377
PDO_DBG_RETURN(0);
393378
} else {
394379
PDO_DBG_RETURN(pdo_mysql_fill_stmt_from_result(stmt));
395380
}
396-
#endif
397381
}
398382
/* }}} */
399383

0 commit comments

Comments
 (0)