1
0
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:
Michael Widenius
2009-11-26 22:19:33 +02:00
parent 847bab8e75
commit d210df50a2
6 changed files with 21 additions and 3 deletions

View File

@@ -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
}