summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd_connection.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-12-10 10:31:43 +0100
committerNikita Popov <nikita.ppv@gmail.com>2020-12-10 10:31:43 +0100
commit030845eb6810d1f49606b478051233965ec41d2b (patch)
tree4934f7e75138f384b820aa136481491f3dec71d0 /ext/mysqlnd/mysqlnd_connection.c
parenta38aaf6cbdd1d966c186318df063a103b7540db8 (diff)
parent9b678bc4d5f56810e468bae7b6fdd9bd825b58ab (diff)
downloadphp-git-030845eb6810d1f49606b478051233965ec41d2b.tar.gz
Merge branch 'PHP-8.0'
* PHP-8.0: Fixed bug #71145
Diffstat (limited to 'ext/mysqlnd/mysqlnd_connection.c')
-rw-r--r--ext/mysqlnd/mysqlnd_connection.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/ext/mysqlnd/mysqlnd_connection.c b/ext/mysqlnd/mysqlnd_connection.c
index 35cc3f55fc..d034fb0ca3 100644
--- a/ext/mysqlnd/mysqlnd_connection.c
+++ b/ext/mysqlnd/mysqlnd_connection.c
@@ -454,12 +454,14 @@ MYSQLND_METHOD(mysqlnd_conn_data, execute_init_commands)(MYSQLND_CONN_DATA * con
ret = FAIL;
break;
}
- if (conn->last_query_type == QUERY_SELECT) {
- MYSQLND_RES * result = conn->m->use_result(conn, 0);
- if (result) {
- result->m.free_result(result, TRUE);
+ do {
+ if (conn->last_query_type == QUERY_SELECT) {
+ MYSQLND_RES * result = conn->m->use_result(conn, 0);
+ if (result) {
+ result->m.free_result(result, TRUE);
+ }
}
- }
+ } while (conn->m->next_result(conn) != FAIL);
}
}
}