BUG#55415 wait_for_update_bin_log enters a condition but does not leave

In sql/log.c, member function wait_for_update_bin_log, a condition is entered with
THD::enter_cond but is not exited. This might leave dangling references to the
mutex/condition in the per-thread information area.

To fix the problem, we call exit_cond to properly remove references to the mutex,
LOCK_log.
This commit is contained in:
Alfranio Correia 2010-08-04 23:28:28 +01:00
commit e297990d5b
2 changed files with 9 additions and 6 deletions

View file

@ -5284,11 +5284,10 @@ int MYSQL_BIN_LOG::wait_for_update_bin_log(THD* thd,
const struct timespec *timeout)
{
int ret= 0;
const char* old_msg = thd->proc_info;
DBUG_ENTER("wait_for_update_bin_log");
old_msg= thd->enter_cond(&update_cond, &LOCK_log,
"Master has sent all binlog to slave; "
"waiting for binlog to be updated");
thd->enter_cond(&update_cond, &LOCK_log,
"Master has sent all binlog to slave; "
"waiting for binlog to be updated");
if (!timeout)
mysql_cond_wait(&update_cond, &LOCK_log);
else