Commit f71bed08 authored by Michael Widenius's avatar Michael Widenius Committed by Sergei Golubchik

Safety fix: lock binlog_end_pos before calling signal_update

The mutex is needed to ensure that sql thread should not not miss the error
signal.
parent 458d5ed8
...@@ -256,7 +256,9 @@ signal_error_to_sql_driver_thread(THD *thd, rpl_group_info *rgi, int err) ...@@ -256,7 +256,9 @@ signal_error_to_sql_driver_thread(THD *thd, rpl_group_info *rgi, int err)
rgi->rli->stop_for_until= false; rgi->rli->stop_for_until= false;
mysql_mutex_lock(rgi->rli->relay_log.get_log_lock()); mysql_mutex_lock(rgi->rli->relay_log.get_log_lock());
mysql_mutex_unlock(rgi->rli->relay_log.get_log_lock()); mysql_mutex_unlock(rgi->rli->relay_log.get_log_lock());
rgi->rli->relay_log.lock_binlog_end_pos();
rgi->rli->relay_log.signal_update(); rgi->rli->relay_log.signal_update();
rgi->rli->relay_log.unlock_binlog_end_pos();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment