summaryrefslogtreecommitdiff
path: root/sql/log.cc
diff options
context:
space:
mode:
authorDaniel Black <grooverdan@users.sourceforge.net>2015-04-01 21:51:55 +1100
committerDaniel Black <grooverdan@users.sourceforge.net>2015-04-01 21:51:55 +1100
commitdd7026a703aabdbe0430bf5f32c6f4f5c6d9c240 (patch)
treeff0816724965a037d46e2dcbb9e59e6568a14a05 /sql/log.cc
parent41c337a17174debc7821993b4e790b897835ba81 (diff)
downloadmariadb-git-dd7026a703aabdbe0430bf5f32c6f4f5c6d9c240.tar.gz
All updates to binlog_status_group_commit_reason* are under LOCK_prepare_ordered
Diffstat (limited to 'sql/log.cc')
-rw-r--r--sql/log.cc10
1 files changed, 6 insertions, 4 deletions
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)
{