summaryrefslogtreecommitdiff
path: root/ext/mysqlnd
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-12-10 11:24:08 +0100
committerNikita Popov <nikita.ppv@gmail.com>2020-12-10 11:24:19 +0100
commitd63aedd173fbb8b3399cff4b991f8a343dd0f331 (patch)
tree7e574c48a5f817c751b579dbc482df59d95b3c57 /ext/mysqlnd
parent9b678bc4d5f56810e468bae7b6fdd9bd825b58ab (diff)
parente450621f5e0a9490c287c8c71650f8b4d5ebbc2b (diff)
downloadphp-git-d63aedd173fbb8b3399cff4b991f8a343dd0f331.tar.gz
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4: Fixed bug #76815
Diffstat (limited to 'ext/mysqlnd')
-rw-r--r--ext/mysqlnd/mysqlnd_result.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/mysqlnd/mysqlnd_result.c b/ext/mysqlnd/mysqlnd_result.c
index 28761aeb0a..f2386f5c00 100644
--- a/ext/mysqlnd/mysqlnd_result.c
+++ b/ext/mysqlnd/mysqlnd_result.c
@@ -1357,6 +1357,13 @@ MYSQLND_METHOD(mysqlnd_res, store_result_fetch_data)(MYSQLND_CONN_DATA * const c
UPSERT_STATUS_SET_SERVER_STATUS(conn->upsert_status, row_packet.server_status);
}
+ if (ret == FAIL) {
+ /* Error packets do not contain server status information. However, we know that after
+ * an error there will be no further result sets. */
+ UPSERT_STATUS_SET_SERVER_STATUS(conn->upsert_status,
+ UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_status) & ~SERVER_MORE_RESULTS_EXISTS);
+ }
+
/* save some memory */
if (free_rows) {
/* don't try to allocate more than possible - mnd_XXalloc expects size_t, and it can have narrower range than uint64_t */