Skip to content

Commit dd7026a

Browse files
committed
All updates to binlog_status_group_commit_reason* are under LOCK_prepare_ordered
1 parent 41c337a commit dd7026a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

sql/log.cc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9783,16 +9783,18 @@ TC_LOG_BINLOG::set_status_variables(THD *thd)
97839783
mysql_mutex_lock(&LOCK_commit_ordered);
97849784
binlog_status_var_num_commits= this->num_commits;
97859785
binlog_status_var_num_group_commits= this->num_group_commits;
9786-
binlog_status_group_commit_reason_count= this->group_commit_reason_count;
9787-
binlog_status_group_commit_reason_usec= this->group_commit_reason_usec;
9788-
binlog_status_group_commit_reason_transaction= this->group_commit_reason_transaction;
9789-
binlog_status_group_commit_reason_immediate= this->group_commit_reason_immediate;
97909786
if (!have_snapshot)
97919787
{
97929788
set_binlog_snapshot_file(last_commit_pos_file);
97939789
binlog_snapshot_position= last_commit_pos_offset;
97949790
}
97959791
mysql_mutex_unlock(&LOCK_commit_ordered);
9792+
mysql_mutex_lock(&LOCK_prepare_ordered);
9793+
binlog_status_group_commit_reason_count= this->group_commit_reason_count;
9794+
binlog_status_group_commit_reason_usec= this->group_commit_reason_usec;
9795+
binlog_status_group_commit_reason_transaction= this->group_commit_reason_transaction;
9796+
binlog_status_group_commit_reason_immediate= this->group_commit_reason_immediate;
9797+
mysql_mutex_unlock(&LOCK_prepare_ordered);
97969798

97979799
if (have_snapshot)
97989800
{

0 commit comments

Comments
 (0)