mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Fixed bug #67004
Repeated execute() with native PS failed to release the previous result set on libmysqlclient. Move freeing the result set into a common location.
This commit is contained in:
parent
d6b4b82a38
commit
ad8eb116d8
3 changed files with 39 additions and 4 deletions
|
@ -303,7 +303,6 @@ static int pdo_mysql_stmt_execute_prepared_mysqlnd(pdo_stmt_t *stmt) /* {{{ */
|
|||
PDO_DBG_RETURN(0);
|
||||
}
|
||||
|
||||
pdo_mysql_free_result(S);
|
||||
PDO_DBG_RETURN(pdo_mysql_stmt_after_execute_prepared(stmt));
|
||||
}
|
||||
/* }}} */
|
||||
|
@ -316,14 +315,14 @@ static int pdo_mysql_stmt_execute(pdo_stmt_t *stmt) /* {{{ */
|
|||
PDO_DBG_ENTER("pdo_mysql_stmt_execute");
|
||||
PDO_DBG_INF_FMT("stmt=%p", S->stmt);
|
||||
|
||||
/* ensure that we free any previous unfetched results */
|
||||
pdo_mysql_free_result(S);
|
||||
S->done = 0;
|
||||
|
||||
if (S->stmt) {
|
||||
PDO_DBG_RETURN(pdo_mysql_stmt_execute_prepared(stmt));
|
||||
}
|
||||
|
||||
/* ensure that we free any previous unfetched results */
|
||||
pdo_mysql_free_result(S);
|
||||
|
||||
if (mysql_real_query(H->server, stmt->active_query_string, stmt->active_query_stringlen) != 0) {
|
||||
pdo_mysql_error_stmt(stmt);
|
||||
PDO_DBG_RETURN(0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue