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

Merge 10.5 into 10.6

This commit is contained in:
Marko Mäkelä
2020-08-04 07:55:16 +03:00
472 changed files with 12262 additions and 4832 deletions

View File

@ -459,11 +459,25 @@ void tp_timeout_handler(TP_connection *c)
{
if (c->state != TP_STATE_IDLE)
return;
THD *thd=c->thd;
THD *thd= c->thd;
mysql_mutex_lock(&thd->LOCK_thd_kill);
thd->set_killed_no_mutex(KILL_WAIT_TIMEOUT);
c->priority= TP_PRIORITY_HIGH;
post_kill_notification(thd);
Vio *vio= thd->net.vio;
if (vio && (vio_pending(vio) > 0 || vio->has_data(vio)) &&
c->state == TP_STATE_IDLE)
{
/*
There is some data on that connection, i.e
i.e there was no inactivity timeout.
Don't kill.
*/
c->state= TP_STATE_PENDING;
}
else if (c->state == TP_STATE_IDLE)
{
thd->set_killed_no_mutex(KILL_WAIT_TIMEOUT);
c->priority= TP_PRIORITY_HIGH;
post_kill_notification(thd);
}
mysql_mutex_unlock(&thd->LOCK_thd_kill);
}