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

Fixed problem with INSERT DELAYED

Make killing threads safer
This commit is contained in:
monty@hundin.mysql.fi
2001-08-31 23:02:09 +03:00
parent 298cb454e7
commit e251f9d827
5 changed files with 41 additions and 21 deletions

View File

@ -509,12 +509,14 @@ static void close_connections(void)
if (tmp->mysys_var)
{
tmp->mysys_var->abort=1;
if (tmp->mysys_var->current_mutex)
pthread_mutex_lock(&tmp->mysys_var->mutex);
if (tmp->mysys_var->current_cond)
{
pthread_mutex_lock(tmp->mysys_var->current_mutex);
pthread_cond_broadcast(tmp->mysys_var->current_cond);
pthread_mutex_unlock(tmp->mysys_var->current_mutex);
}
pthread_mutex_unlock(&tmp->mysys_var->mutex);
}
}
(void) pthread_mutex_unlock(&LOCK_thread_count); // For unlink from list