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

Function rpl_append_gtid_state

sql/sql_repl.cc:5679–5694  ·  view source on GitHub ↗

Format the current GTID state as a string, for returning the value of @@global.gtid_slave_pos. If the flag use_binlog is true, then the contents of the binary log (if enabled) is merged into the current GTID state (@@global.gtid_current_pos). */

Source from the content-addressed store, hash-verified

5677 enabled) is merged into the current GTID state (@@global.gtid_current_pos).
5678*/
5679int
5680rpl_append_gtid_state(String *dest, bool use_binlog)
5681{
5682 int err;
5683 rpl_gtid *gtid_list= NULL;
5684 uint32 num_gtids= 0;
5685
5686 if (use_binlog && opt_bin_log &&
5687 (err= mysql_bin_log.get_most_recent_gtid_list(&gtid_list, &num_gtids)))
5688 return err;
5689
5690 err= rpl_global_gtid_slave_state->tostring(dest, gtid_list, num_gtids);
5691 my_free(gtid_list);
5692
5693 return err;
5694}
5695
5696
5697/*

Callers 5

change_masterFunction · 0.85
fill_slave_statusFunction · 0.85
slave_output_error_infoFunction · 0.85
handle_slave_sqlFunction · 0.85
global_value_ptrMethod · 0.85

Calls 3

my_freeFunction · 0.85
tostringMethod · 0.80

Tested by

no test coverage detected