diff options
author | Sergey Vojtovich <svoj@mariadb.org> | 2020-04-15 18:35:48 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2020-04-15 18:36:07 +0400 |
commit | 5876ed9e5b573596d449edfafc1f99caf5fd03d0 (patch) | |
tree | e5f4c19b5ee2de3b6f9dd57bcdcc8914fcba4faf /sql | |
parent | c1bdf62452139e9310d3234266802748ba4c74b8 (diff) | |
download | mariadb-git-5876ed9e5b573596d449edfafc1f99caf5fd03d0.tar.gz |
Relay_log_info::executed_entries to Atomic_counter
Diffstat (limited to 'sql')
-rw-r--r-- | sql/rpl_parallel.cc | 2 | ||||
-rw-r--r-- | sql/rpl_rli.h | 2 | ||||
-rw-r--r-- | sql/slave.cc | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/sql/rpl_parallel.cc b/sql/rpl_parallel.cc index f5a30d6f877..9344312fe62 100644 --- a/sql/rpl_parallel.cc +++ b/sql/rpl_parallel.cc @@ -60,7 +60,7 @@ rpt_handle_event(rpl_parallel_thread::queued_event *qev, rgi->last_master_timestamp= ev->when + (time_t)ev->exec_time; err= apply_event_and_update_pos_for_parallel(ev, thd, rgi); - thread_safe_increment64(&rli->executed_entries); + rli->executed_entries++; #ifdef WITH_WSREP if (wsrep_after_statement(thd)) { diff --git a/sql/rpl_rli.h b/sql/rpl_rli.h index 5d2d33c397f..fafe8ead63d 100644 --- a/sql/rpl_rli.h +++ b/sql/rpl_rli.h @@ -347,7 +347,7 @@ public: Number of executed events for SLAVE STATUS. Protected by slave_executed_entries_lock */ - int64 executed_entries; + Atomic_counter<uint32_t> executed_entries; /* If the end of the hot relay log is made of master's events ignored by the diff --git a/sql/slave.cc b/sql/slave.cc index 7fb68d2dfb5..be200ce52d8 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -3438,7 +3438,7 @@ static bool send_show_master_info_data(THD *thd, Master_info *mi, bool full, { protocol->store((uint32) mi->rli.retried_trans); protocol->store((ulonglong) mi->rli.max_relay_log_size); - protocol->store((uint32) mi->rli.executed_entries); + protocol->store(mi->rli.executed_entries); protocol->store((uint32) mi->received_heartbeats); protocol->store((double) mi->heartbeat_period, 3, &tmp); protocol->store(gtid_pos->ptr(), gtid_pos->length(), &my_charset_bin); @@ -4537,7 +4537,7 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli, } } - thread_safe_increment64(&rli->executed_entries); + rli->executed_entries++; #ifdef WITH_WSREP wsrep_after_statement(thd); #endif /* WITH_WSREP */ |