1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-07 02:42:49 +03:00

Merge branch '3.1' into 3.3

This commit is contained in:
Georg Richter
2023-02-09 08:57:48 +01:00
4 changed files with 132 additions and 4 deletions

View File

@@ -4776,13 +4776,22 @@ int STDCALL mysql_reset_connection(MYSQL *mysql)
/* skip result sets */
if (mysql->status == MYSQL_STATUS_USE_RESULT ||
mysql->status == MYSQL_STATUS_GET_RESULT ||
mysql->status & SERVER_MORE_RESULTS_EXIST)
mysql->status == MYSQL_STATUS_GET_RESULT)
{
mthd_my_skip_result(mysql);
mysql->status= MYSQL_STATUS_READY;
}
if (mysql->server_status & SERVER_MORE_RESULTS_EXIST)
{
while (mysql_next_result(mysql))
{
MYSQL_RES *res= mysql_use_result(mysql);
mysql_free_result(res);
}
}
mysql->status= MYSQL_STATUS_READY;
rc= ma_simple_command(mysql, COM_RESET_CONNECTION, 0, 0, 0, 0);
if (rc && mysql->options.reconnect)
{