mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 03:47:17 +02:00
LP9091416: destroy timer mutex when threadpool scheduler shuts down.
Fixes valgrind warning.
This commit is contained in:
parent
ecad00bc4e
commit
54b61b8b44
1 changed files with 5 additions and 0 deletions
|
|
@ -470,7 +470,10 @@ static void* timer_thread(void *param)
|
||||||
mysql_mutex_lock(&timer->mutex);
|
mysql_mutex_lock(&timer->mutex);
|
||||||
int err = mysql_cond_timedwait(&timer->cond, &timer->mutex, &ts);
|
int err = mysql_cond_timedwait(&timer->cond, &timer->mutex, &ts);
|
||||||
if (timer->shutdown)
|
if (timer->shutdown)
|
||||||
|
{
|
||||||
|
mysql_mutex_unlock(&timer->mutex);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
if (err == ETIMEDOUT)
|
if (err == ETIMEDOUT)
|
||||||
{
|
{
|
||||||
timer->current_microtime= microsecond_interval_timer();
|
timer->current_microtime= microsecond_interval_timer();
|
||||||
|
|
@ -488,6 +491,8 @@ static void* timer_thread(void *param)
|
||||||
}
|
}
|
||||||
mysql_mutex_unlock(&timer->mutex);
|
mysql_mutex_unlock(&timer->mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mysql_mutex_destroy(&timer->mutex);
|
||||||
DBUG_POP();
|
DBUG_POP();
|
||||||
my_thread_end();
|
my_thread_end();
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue