1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Fixed bug in INSERT DELAYED

Fixed some problems in SHOW CREATE TABLE
Fixed calculation of checksums in myisamchk
This commit is contained in:
monty@hundin.mysql.fi
2001-10-02 21:08:08 +03:00
parent a99b7e77cd
commit d28f23c14f
5 changed files with 35 additions and 18 deletions

View File

@ -841,6 +841,7 @@ void kill_delayed_threads(void)
delayed_insert *tmp;
while ((tmp=it++))
{
/* Ensure that the thread doesn't kill itself while we are looking at it */
pthread_mutex_lock(&tmp->mutex);
tmp->thd.killed=1;
if (tmp->thd.mysys_var)
@ -848,9 +849,15 @@ void kill_delayed_threads(void)
pthread_mutex_lock(&tmp->thd.mysys_var->mutex);
if (tmp->thd.mysys_var->current_cond)
{
pthread_mutex_lock(tmp->thd.mysys_var->current_mutex);
/*
We need the following test because the main mutex may be locked
in handle_delayed_insert()
*/
if (&tmp->mutex != tmp->thd.mysys_var->current_mutex)
pthread_mutex_lock(tmp->thd.mysys_var->current_mutex);
pthread_cond_broadcast(tmp->thd.mysys_var->current_cond);
pthread_mutex_unlock(tmp->thd.mysys_var->current_mutex);
if (&tmp->mutex != tmp->thd.mysys_var->current_mutex)
pthread_mutex_unlock(tmp->thd.mysys_var->current_mutex);
}
pthread_mutex_unlock(&tmp->thd.mysys_var->mutex);
}