mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Prevent mysqli::next_result from reporting errors from previous calls (#7304)
This commit is contained in:
parent
1fa26eccba
commit
d26069a2f1
3 changed files with 30 additions and 5 deletions
|
@ -1481,13 +1481,14 @@ MYSQLND_METHOD(mysqlnd_conn_data, next_result)(MYSQLND_CONN_DATA * const conn)
|
|||
DBG_ENTER("mysqlnd_conn_data::next_result");
|
||||
DBG_INF_FMT("conn=%llu", conn->thread_id);
|
||||
|
||||
SET_EMPTY_ERROR(conn->error_info);
|
||||
|
||||
if (PASS == conn->m->local_tx_start(conn, this_func)) {
|
||||
do {
|
||||
if (GET_CONNECTION_STATE(&conn->state) != CONN_NEXT_RESULT_PENDING) {
|
||||
break;
|
||||
}
|
||||
|
||||
SET_EMPTY_ERROR(conn->error_info);
|
||||
UPSERT_STATUS_SET_AFFECTED_ROWS_TO_ERROR(conn->upsert_status);
|
||||
/*
|
||||
We are sure that there is a result set, since conn->state is set accordingly
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue