summaryrefslogtreecommitdiff
path: root/sql/rpl_rli.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/rpl_rli.cc')
-rw-r--r--sql/rpl_rli.cc30
1 files changed, 15 insertions, 15 deletions
diff --git a/sql/rpl_rli.cc b/sql/rpl_rli.cc
index 7bdd9c1861f..987e011d5eb 100644
--- a/sql/rpl_rli.cc
+++ b/sql/rpl_rli.cc
@@ -37,7 +37,7 @@ static int count_relay_log_space(Relay_log_info* rli);
Current replication state (hash of last GTID executed, per replication
domain).
*/
-rpl_slave_state rpl_global_gtid_slave_state;
+rpl_slave_state *rpl_global_gtid_slave_state;
/* Object used for MASTER_GTID_WAIT(). */
gtid_waiting rpl_global_gtid_waiting;
@@ -1325,7 +1325,7 @@ void Relay_log_info::stmt_done(my_off_t event_master_log_pos, THD *thd,
else
{
inc_group_relay_log_pos(event_master_log_pos, rgi);
- if (rpl_global_gtid_slave_state.record_and_update_gtid(thd, rgi))
+ if (rpl_global_gtid_slave_state->record_and_update_gtid(thd, rgi))
{
report(WARNING_LEVEL, ER_CANNOT_UPDATE_GTID_STATE, rgi->gtid_info(),
"Failed to update GTID state in %s.%s, slave state may become "
@@ -1449,9 +1449,9 @@ rpl_load_gtid_slave_state(THD *thd)
uint32 i;
DBUG_ENTER("rpl_load_gtid_slave_state");
- mysql_mutex_lock(&rpl_global_gtid_slave_state.LOCK_slave_state);
- bool loaded= rpl_global_gtid_slave_state.loaded;
- mysql_mutex_unlock(&rpl_global_gtid_slave_state.LOCK_slave_state);
+ mysql_mutex_lock(&rpl_global_gtid_slave_state->LOCK_slave_state);
+ bool loaded= rpl_global_gtid_slave_state->loaded;
+ mysql_mutex_unlock(&rpl_global_gtid_slave_state->LOCK_slave_state);
if (loaded)
DBUG_RETURN(0);
@@ -1551,23 +1551,23 @@ rpl_load_gtid_slave_state(THD *thd)
}
}
- mysql_mutex_lock(&rpl_global_gtid_slave_state.LOCK_slave_state);
- if (rpl_global_gtid_slave_state.loaded)
+ mysql_mutex_lock(&rpl_global_gtid_slave_state->LOCK_slave_state);
+ if (rpl_global_gtid_slave_state->loaded)
{
- mysql_mutex_unlock(&rpl_global_gtid_slave_state.LOCK_slave_state);
+ mysql_mutex_unlock(&rpl_global_gtid_slave_state->LOCK_slave_state);
goto end;
}
for (i= 0; i < array.elements; ++i)
{
get_dynamic(&array, (uchar *)&tmp_entry, i);
- if ((err= rpl_global_gtid_slave_state.update(tmp_entry.gtid.domain_id,
+ if ((err= rpl_global_gtid_slave_state->update(tmp_entry.gtid.domain_id,
tmp_entry.gtid.server_id,
tmp_entry.sub_id,
tmp_entry.gtid.seq_no,
NULL)))
{
- mysql_mutex_unlock(&rpl_global_gtid_slave_state.LOCK_slave_state);
+ mysql_mutex_unlock(&rpl_global_gtid_slave_state->LOCK_slave_state);
my_error(ER_OUT_OF_RESOURCES, MYF(0));
goto end;
}
@@ -1580,14 +1580,14 @@ rpl_load_gtid_slave_state(THD *thd)
mysql_bin_log.bump_seq_no_counter_if_needed(entry->gtid.domain_id,
entry->gtid.seq_no))
{
- mysql_mutex_unlock(&rpl_global_gtid_slave_state.LOCK_slave_state);
+ mysql_mutex_unlock(&rpl_global_gtid_slave_state->LOCK_slave_state);
my_error(ER_OUT_OF_RESOURCES, MYF(0));
goto end;
}
}
- rpl_global_gtid_slave_state.loaded= true;
- mysql_mutex_unlock(&rpl_global_gtid_slave_state.LOCK_slave_state);
+ rpl_global_gtid_slave_state->loaded= true;
+ mysql_mutex_unlock(&rpl_global_gtid_slave_state->LOCK_slave_state);
err= 0; /* Clear HA_ERR_END_OF_FILE */
@@ -1657,7 +1657,7 @@ rpl_group_info::~rpl_group_info()
int
event_group_new_gtid(rpl_group_info *rgi, Gtid_log_event *gev)
{
- uint64 sub_id= rpl_global_gtid_slave_state.next_sub_id(gev->domain_id);
+ uint64 sub_id= rpl_global_gtid_slave_state->next_sub_id(gev->domain_id);
if (!sub_id)
{
/* Out of memory caused hash insertion to fail. */
@@ -1772,7 +1772,7 @@ void rpl_group_info::cleanup_context(THD *thd, bool error)
--gtid-ignore-duplicates.
*/
if (gtid_ignore_duplicate_state != GTID_DUPLICATE_NULL)
- rpl_global_gtid_slave_state.release_domain_owner(this);
+ rpl_global_gtid_slave_state->release_domain_owner(this);
}
/*