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). */
| 5677 | enabled) is merged into the current GTID state (@@global.gtid_current_pos). |
| 5678 | */ |
| 5679 | int |
| 5680 | rpl_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(>id_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 | /* |
no test coverage detected