mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 11:27:39 +02:00
Fix for:
Bug #4810 "deadlock with KILL when the victim was in a wait state" (I included mutex unlock into exit_cond() for future safety) and BUG#4827 "KILL while START SLAVE may lead to replication slave crash" sql/lock.cc: we did exit_cond() before unlock(LOCK_open), which led to deadlocks with THD::awake(). Fixing this. sql/log.cc: mutex unlock is now included in exit_cond() sql/repl_failsafe.cc: we did exit_cond() before unlock(LOCK_rpl_status), which led to deadlocks with THD::awake(). Fixing this. sql/slave.cc: we did exit_cond() before unlock(cond_lock), which led to deadlocks with THD::awake(). Fixing this. Fixing also that if killed while waiting for slave thread to start, we don't release the mutex (that caused a double release of the mutex => crash). sql/sql_class.h: comments about exit_cond()/enter_cond(). Mutex unlock is now included in exit_cond() so that it's always done in the good order. sql/sql_table.cc: unlock is now included in exit_cond().
This commit is contained in:
parent
42ed0103c8
commit
00e7ec4279
6 changed files with 33 additions and 36 deletions
|
|
@ -1301,7 +1301,6 @@ static int mysql_admin_table(THD* thd, TABLE_LIST* tables,
|
|||
dropping_tables--;
|
||||
}
|
||||
thd->exit_cond(old_message);
|
||||
pthread_mutex_unlock(&LOCK_open);
|
||||
if (thd->killed)
|
||||
goto err;
|
||||
open_for_modify=0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue