From a39d92ca574e275acaf4240629d4bee5f9ece3f6 Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Sat, 21 Mar 2020 17:36:38 +0400 Subject: gtid_pos_table: my_atomic to std::atomic --- sql/rpl_rli.cc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'sql/rpl_rli.cc') diff --git a/sql/rpl_rli.cc b/sql/rpl_rli.cc index d645fea6968..18ee6a98ed0 100644 --- a/sql/rpl_rli.cc +++ b/sql/rpl_rli.cc @@ -2019,10 +2019,9 @@ find_gtid_slave_pos_tables(THD *thd) However we can add new entries, and warn about any tables that disappeared, but may still be visible to running SQL threads. */ - rpl_slave_state::gtid_pos_table *old_entry, *new_entry, **next_ptr_ptr; - - old_entry= (rpl_slave_state::gtid_pos_table *) - rpl_global_gtid_slave_state->gtid_pos_tables; + rpl_slave_state::gtid_pos_table *new_entry, **next_ptr_ptr; + auto old_entry= rpl_global_gtid_slave_state-> + gtid_pos_tables.load(std::memory_order_relaxed); while (old_entry) { new_entry= cb_data.table_list; @@ -2044,8 +2043,8 @@ find_gtid_slave_pos_tables(THD *thd) while (new_entry) { /* Check if we already have a table with this storage engine. */ - old_entry= (rpl_slave_state::gtid_pos_table *) - rpl_global_gtid_slave_state->gtid_pos_tables; + old_entry= rpl_global_gtid_slave_state-> + gtid_pos_tables.load(std::memory_order_relaxed); while (old_entry) { if (new_entry->table_hton == old_entry->table_hton) -- cgit v1.2.1