Below is the list of changes that have just been committed into a local
4.1 repository of svoj. When svoj does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2006-10-27 16:42:18+05:00, svoj@stripped +1 -0
BUG#23312 - server hangs 'closing tables' with insert delayed,flush
tables,alter table
Fixed a deadlock when delayed insert + flush tables + alter table running
concurrently.
sql/sql_insert.cc@stripped, 2006-10-27 16:33:48+05:00, svoj@stripped +0 -3
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.
Deadlock could happen if there are delayed insert + flush tables + alter table
running concurrently.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: svoj
# Host: april.(none)
# Root: /home/svoj/devel/mysql/BUG23312/mysql-4.1-engines
--- 1.172/sql/sql_insert.cc 2006-10-27 16:42:21 +05:00
+++ 1.173/sql/sql_insert.cc 2006-10-27 16:42:21 +05:00
@@ -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
}
| Thread |
|---|
| • bk commit into 4.1 tree (svoj:1.2534) BUG#23312 | Sergey Vojtovich | 27 Oct |