diff options
author | serg@serg.mylan <> | 2004-08-18 19:57:55 +0200 |
---|---|---|
committer | serg@serg.mylan <> | 2004-08-18 19:57:55 +0200 |
commit | e1237cbc53355382e032f0e88f906d67edd1f597 (patch) | |
tree | 8ac7985dc9b6caddd1c2402ef8606e4a4cd85ada /sql/log.cc | |
parent | 7c69afaf15eda7d51b2254e71c7078aaab3aa0f3 (diff) | |
parent | 8ce92878a2c32785a5af86e9ffa27b4904d01694 (diff) | |
download | mariadb-git-e1237cbc53355382e032f0e88f906d67edd1f597.tar.gz |
manually merged
Diffstat (limited to 'sql/log.cc')
-rw-r--r-- | sql/log.cc | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/sql/log.cc b/sql/log.cc index afba530ce49..ac412f2de9a 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -1782,17 +1782,12 @@ bool MYSQL_LOG::write(THD *thd,const char *query, uint query_length, NOTES One must have a lock on LOCK_log before calling this function. - This lock will be freed before return! - - The reason for the above is that for enter_cond() / exit_cond() to - work the mutex must be got before enter_cond() but releases before - exit_cond(). - If you don't do it this way, you will get a deadlock in THD::awake() + This lock will be freed before return! That's required by + THD::enter_cond() (see NOTES in sql_class.h). */ void MYSQL_LOG:: wait_for_update(THD* thd, bool master_or_slave) { - safe_mutex_assert_owner(&LOCK_log); const char* old_msg = thd->enter_cond(&update_cond, &LOCK_log, master_or_slave ? "Has read all relay log; waiting for \ @@ -1800,7 +1795,6 @@ the slave I/O thread to update it" : "Has sent all binlog to slave; \ waiting for binlog to be updated"); pthread_cond_wait(&update_cond, &LOCK_log); - pthread_mutex_unlock(&LOCK_log); // See NOTES thd->exit_cond(old_msg); } |