diff options
author | unknown <svoj@mysql.com/april.(none)> | 2006-11-02 00:05:02 +0400 |
---|---|---|
committer | unknown <svoj@mysql.com/april.(none)> | 2006-11-02 00:05:02 +0400 |
commit | 88f55bf8c24a103b9eb8879e071e2e137c71ee22 (patch) | |
tree | 1f0f57b0722583c38541aa45e57866334b911311 /sql/sql_insert.cc | |
parent | 2576c4c0c90d00348c1bb17fa1a6f76e6e3988f3 (diff) | |
download | mariadb-git-88f55bf8c24a103b9eb8879e071e2e137c71ee22.tar.gz |
BUG#23312 - server hangs 'closing tables' with insert delayed,flush
tables,alter table
Deadlock could happen if there are delayed insert + flush tables + alter table
running concurrently.
This is fixed by removing a redundant mutex lock when killing a delayed thread.
sql/sql_insert.cc:
Removed redundant delayed thread mutex lock, that could result in a deadlock.
LOCK_delayed_insert is sufficient to be sure that no other thread frees delayed
handler.
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r-- | sql/sql_insert.cc | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 283fe571d53..2887d97bd8f 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -1181,8 +1181,6 @@ 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) { @@ -1201,7 +1199,6 @@ void kill_delayed_threads(void) } pthread_mutex_unlock(&tmp->thd.mysys_var->mutex); } - pthread_mutex_unlock(&tmp->mutex); } VOID(pthread_mutex_unlock(&LOCK_delayed_insert)); // For unlink from list } |