summaryrefslogtreecommitdiff
path: root/sql/mysqld.cc
diff options
context:
space:
mode:
authormonty@hundin.mysql.fi <>2001-08-31 23:02:09 +0300
committermonty@hundin.mysql.fi <>2001-08-31 23:02:09 +0300
commite251f9d827a54d69007bae3200da8e7ff6e9019e (patch)
treee26c23520c4a8d41f977bce9e83f52bdd4b00fc4 /sql/mysqld.cc
parent298cb454e75035300d7f3e723109516919621934 (diff)
downloadmariadb-git-e251f9d827a54d69007bae3200da8e7ff6e9019e.tar.gz
Fixed problem with INSERT DELAYED
Make killing threads safer
Diffstat (limited to 'sql/mysqld.cc')
-rw-r--r--sql/mysqld.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index b484eee3480..1255b55a81c 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -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