MCPcopy Create free account
hub / github.com/MariaDB/server / rpl_load_gtid_state

Function rpl_load_gtid_state

sql/sql_repl.cc:5704–5719  ·  view source on GitHub ↗

Load the current GTID position into a slave_connection_state, for use when connecting to a master server with GTID. If the flag use_binlog is true, then the contents of the binary log (if enabled) is merged into the current GTID state (master_use_gtid=current_pos). */

Source from the content-addressed store, hash-verified

5702 enabled) is merged into the current GTID state (master_use_gtid=current_pos).
5703*/
5704int
5705rpl_load_gtid_state(slave_connection_state *state, bool use_binlog)
5706{
5707 int err;
5708 rpl_gtid *gtid_list= NULL;
5709 uint32 num_gtids= 0;
5710
5711 if (use_binlog && opt_bin_log &&
5712 (err= mysql_bin_log.get_most_recent_gtid_list(&gtid_list, &num_gtids)))
5713 return err;
5714
5715 err= state->load(rpl_global_gtid_slave_state, gtid_list, num_gtids);
5716 my_free(gtid_list);
5717
5718 return err;
5719}
5720
5721
5722bool

Callers 1

start_slave_threadsFunction · 0.85

Calls 3

my_freeFunction · 0.85
loadMethod · 0.45

Tested by

no test coverage detected