1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge 10.4 to 10.5

This commit is contained in:
Marko Mäkelä
2020-10-22 17:08:49 +03:00
185 changed files with 3709 additions and 657 deletions

View File

@ -312,6 +312,16 @@ static void handle_wait_timeout(THD *thd)
thd->net.error= 2;
}
/** Check if some client data is cached in thd->net or thd->net.vio */
static bool has_unread_data(THD* thd)
{
NET *net= &thd->net;
if (net->compress && net->remain_in_buf)
return true;
Vio *vio= net->vio;
return vio->has_data(vio);
}
/**
Process a single client request or a single batch.
@ -346,7 +356,6 @@ static int threadpool_process_request(THD *thd)
*/
for(;;)
{
Vio *vio;
thd->net.reading_or_writing= 0;
if (mysql_audit_release_required(thd))
mysql_audit_release(thd);
@ -362,8 +371,7 @@ static int threadpool_process_request(THD *thd)
set_thd_idle(thd);
vio= thd->net.vio;
if (!vio->has_data(vio))
if (!has_unread_data(thd))
{
/* More info on this debug sync is in sql_parse.cc*/
DEBUG_SYNC(thd, "before_do_command_net_read");