mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Added protection around usage of thd->mysys_var
(May be changed to 0 by scheduler)
This commit is contained in:
@@ -2279,6 +2279,7 @@ void kill_delayed_threads(void)
|
||||
while ((di= it++))
|
||||
{
|
||||
di->thd.killed= THD::KILL_CONNECTION;
|
||||
pthread_mutex_lock(&di->thd.LOCK_thd_data);
|
||||
if (di->thd.mysys_var)
|
||||
{
|
||||
pthread_mutex_lock(&di->thd.mysys_var->mutex);
|
||||
@@ -2297,6 +2298,7 @@ void kill_delayed_threads(void)
|
||||
}
|
||||
pthread_mutex_unlock(&di->thd.mysys_var->mutex);
|
||||
}
|
||||
pthread_mutex_unlock(&di->thd.LOCK_thd_data);
|
||||
}
|
||||
VOID(pthread_mutex_unlock(&LOCK_delayed_insert)); // For unlink from list
|
||||
}
|
||||
|
Reference in New Issue
Block a user