From dd7026a703aabdbe0430bf5f32c6f4f5c6d9c240 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Wed, 1 Apr 2015 21:51:55 +1100 Subject: All updates to binlog_status_group_commit_reason* are under LOCK_prepare_ordered --- sql/log.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'sql/log.cc') diff --git a/sql/log.cc b/sql/log.cc index a571539d68a..a2fc198e123 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -9783,16 +9783,18 @@ TC_LOG_BINLOG::set_status_variables(THD *thd) mysql_mutex_lock(&LOCK_commit_ordered); binlog_status_var_num_commits= this->num_commits; binlog_status_var_num_group_commits= this->num_group_commits; - binlog_status_group_commit_reason_count= this->group_commit_reason_count; - binlog_status_group_commit_reason_usec= this->group_commit_reason_usec; - binlog_status_group_commit_reason_transaction= this->group_commit_reason_transaction; - binlog_status_group_commit_reason_immediate= this->group_commit_reason_immediate; if (!have_snapshot) { set_binlog_snapshot_file(last_commit_pos_file); binlog_snapshot_position= last_commit_pos_offset; } mysql_mutex_unlock(&LOCK_commit_ordered); + mysql_mutex_lock(&LOCK_prepare_ordered); + binlog_status_group_commit_reason_count= this->group_commit_reason_count; + binlog_status_group_commit_reason_usec= this->group_commit_reason_usec; + binlog_status_group_commit_reason_transaction= this->group_commit_reason_transaction; + binlog_status_group_commit_reason_immediate= this->group_commit_reason_immediate; + mysql_mutex_unlock(&LOCK_prepare_ordered); if (have_snapshot) { -- cgit v1.2.1