mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Fix stmt_free_result implementation and usage
Two bugs both affecting the bug_pecl_7976.phpt test ("works with mysqlnd" haha): * We should not change the connection state in stmt_free_result. This makes mysql_stmt_free_result usable under mysqlnd and not just libmysqlclient. * If we call mysql_stmt_free_result, we still need to consume any outstanding result sets.
This commit is contained in:
parent
9c0712d2cd
commit
18517e7a63
3 changed files with 1 additions and 9 deletions
|
@ -893,9 +893,7 @@ static int pdo_mysql_stmt_cursor_closer(pdo_stmt_t *stmt) /* {{{ */
|
|||
S->result = NULL;
|
||||
}
|
||||
if (S->stmt) {
|
||||
int retval;
|
||||
retval = mysql_stmt_free_result(S->stmt);
|
||||
PDO_DBG_RETURN(retval ? 0 : 1);
|
||||
mysql_stmt_free_result(S->stmt);
|
||||
}
|
||||
|
||||
while (mysql_more_results(S->H->server)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue