1
0
mirror of https://github.com/MariaDB/server.git synced 2025-10-27 05:56:07 +03:00

Fix bug#53499 - purge thread is active during shutdown, assert buf/buf0buf.c line 4115.

Check that all background threads are suspended or shutdown instead of just
checking for the master thread.
rb://333
This commit is contained in:
Sunny Bains
2010-05-10 13:17:17 +10:00
parent 053d75eadb
commit c7fc8045cb
3 changed files with 23 additions and 17 deletions

View File

@@ -2559,18 +2559,24 @@ srv_inc_activity_count(void)
}
/**********************************************************************//**
Check whether the master thread is active.
@return FALSE is it is not active. */
Check whether any background thread is active.
@return FALSE if all are are suspended or have exited. */
UNIV_INTERN
ibool
srv_is_master_thread_active(void)
/*=============================*/
srv_is_any_background_thread_active(void)
/*=====================================*/
{
ibool ret;
ulint i;
ibool ret = FALSE;
srv_sys_mutex_enter();
ret = srv_sys->n_threads_active[SRV_MASTER] != 0;
for (i = SRV_COM; i <= SRV_MASTER; ++i) {
if (srv_sys->n_threads_active[i] != 0) {
ret = TRUE;
break;
}
}
srv_sys_mutex_exit();