Commit 5876ed9e authored by Sergey Vojtovich's avatar Sergey Vojtovich

Relay_log_info::executed_entries to Atomic_counter

parent c1bdf624
...@@ -827,16 +827,6 @@ static inline void thread_safe_decrement32(int32 *value) ...@@ -827,16 +827,6 @@ static inline void thread_safe_decrement32(int32 *value)
(void) my_atomic_add32_explicit(value, -1, MY_MEMORY_ORDER_RELAXED); (void) my_atomic_add32_explicit(value, -1, MY_MEMORY_ORDER_RELAXED);
} }
static inline void thread_safe_increment64(int64 *value)
{
(void) my_atomic_add64_explicit(value, 1, MY_MEMORY_ORDER_RELAXED);
}
static inline void thread_safe_decrement64(int64 *value)
{
(void) my_atomic_add64_explicit(value, -1, MY_MEMORY_ORDER_RELAXED);
}
/* /*
No locking needed, the counter is owned by the thread No locking needed, the counter is owned by the thread
*/ */
......
...@@ -60,7 +60,7 @@ rpt_handle_event(rpl_parallel_thread::queued_event *qev, ...@@ -60,7 +60,7 @@ rpt_handle_event(rpl_parallel_thread::queued_event *qev,
rgi->last_master_timestamp= ev->when + (time_t)ev->exec_time; rgi->last_master_timestamp= ev->when + (time_t)ev->exec_time;
err= apply_event_and_update_pos_for_parallel(ev, thd, rgi); err= apply_event_and_update_pos_for_parallel(ev, thd, rgi);
thread_safe_increment64(&rli->executed_entries); rli->executed_entries++;
#ifdef WITH_WSREP #ifdef WITH_WSREP
if (wsrep_after_statement(thd)) if (wsrep_after_statement(thd))
{ {
......
...@@ -347,7 +347,7 @@ class Relay_log_info : public Slave_reporting_capability ...@@ -347,7 +347,7 @@ class Relay_log_info : public Slave_reporting_capability
Number of executed events for SLAVE STATUS. Number of executed events for SLAVE STATUS.
Protected by slave_executed_entries_lock 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 If the end of the hot relay log is made of master's events ignored by the
......
...@@ -3438,7 +3438,7 @@ static bool send_show_master_info_data(THD *thd, Master_info *mi, bool full, ...@@ -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((uint32) mi->rli.retried_trans);
protocol->store((ulonglong) mi->rli.max_relay_log_size); 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((uint32) mi->received_heartbeats);
protocol->store((double) mi->heartbeat_period, 3, &tmp); protocol->store((double) mi->heartbeat_period, 3, &tmp);
protocol->store(gtid_pos->ptr(), gtid_pos->length(), &my_charset_bin); 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, ...@@ -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 #ifdef WITH_WSREP
wsrep_after_statement(thd); wsrep_after_statement(thd);
#endif /* WITH_WSREP */ #endif /* WITH_WSREP */
......
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