summaryrefslogtreecommitdiff
path: root/sql/rpl_gtid.cc
diff options
context:
space:
mode:
authorKristian Nielsen <knielsen@knielsen-hq.org>2017-05-10 09:56:31 +0200
committerKristian Nielsen <knielsen@knielsen-hq.org>2017-05-10 09:56:31 +0200
commit0db2cd7c7600c8cd03a1005d299cd0112d80b4ad (patch)
treef22bf1b838726f1a4befd4e3c0e2706dba9cc94d /sql/rpl_gtid.cc
parent8683052389e8f59caeb4218dc300d98627be1750 (diff)
downloadmariadb-git-0db2cd7c7600c8cd03a1005d299cd0112d80b4ad.tar.gz
MDEV-12179: Per-engine mysql.gtid_slave_pos table
Intermediate commit. Fix compilation failure with different my_atomic implementation. The my_atomic_loadptr* takes void ** as first argument, so variables updated with it needs to be void * (it is not legal C to cast some_type ** to void **).
Diffstat (limited to 'sql/rpl_gtid.cc')
-rw-r--r--sql/rpl_gtid.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/sql/rpl_gtid.cc b/sql/rpl_gtid.cc
index a4a774a0200..b1b65119d0b 100644
--- a/sql/rpl_gtid.cc
+++ b/sql/rpl_gtid.cc
@@ -258,7 +258,7 @@ rpl_slave_state::rpl_slave_state()
rpl_slave_state::~rpl_slave_state()
{
- free_gtid_pos_tables(gtid_pos_tables);
+ free_gtid_pos_tables((struct gtid_pos_table *)gtid_pos_tables);
truncate_hash();
my_hash_free(&hash);
delete_dynamic(&gtid_sort_array);
@@ -484,7 +484,8 @@ rpl_slave_state::select_gtid_pos_table(THD *thd, LEX_STRING *out_tablename)
See comments on rpl_slave_state::gtid_pos_tables for rules around proper
access to the list.
*/
- list= my_atomic_loadptr_explicit(&gtid_pos_tables, MY_MEMORY_ORDER_ACQUIRE);
+ list= (struct gtid_pos_table *)
+ my_atomic_loadptr_explicit(&gtid_pos_tables, MY_MEMORY_ORDER_ACQUIRE);
Ha_trx_info *ha_info;
uint count = 0;
@@ -545,8 +546,8 @@ rpl_slave_state::select_gtid_pos_table(THD *thd, LEX_STRING *out_tablename)
already active in the transaction, or if there is no current transaction
engines available, we return the default gtid_slave_pos table.
*/
- default_entry= my_atomic_loadptr_explicit(&default_gtid_pos_table,
- MY_MEMORY_ORDER_ACQUIRE);
+ default_entry= (struct gtid_pos_table *)
+ my_atomic_loadptr_explicit(&default_gtid_pos_table, MY_MEMORY_ORDER_ACQUIRE);
*out_tablename= default_entry->table_name;
/* Record in status that we failed to find a suitable gtid_pos table. */
if (count > 0)
@@ -1268,7 +1269,7 @@ rpl_slave_state::set_gtid_pos_tables_list(rpl_slave_state::gtid_pos_table *new_l
gtid_pos_table *old_list;
mysql_mutex_assert_owner(&LOCK_slave_state);
- old_list= gtid_pos_tables;
+ old_list= (struct gtid_pos_table *)gtid_pos_tables;
my_atomic_storeptr_explicit(&gtid_pos_tables, new_list, MY_MEMORY_ORDER_RELEASE);
my_atomic_storeptr_explicit(&default_gtid_pos_table, default_entry,
MY_MEMORY_ORDER_RELEASE);
@@ -1280,7 +1281,7 @@ void
rpl_slave_state::add_gtid_pos_table(rpl_slave_state::gtid_pos_table *entry)
{
mysql_mutex_assert_owner(&LOCK_slave_state);
- entry->next= gtid_pos_tables;
+ entry->next= (struct gtid_pos_table *)gtid_pos_tables;
my_atomic_storeptr_explicit(&gtid_pos_tables, entry, MY_MEMORY_ORDER_RELEASE);
}