MXS-1712 Add reset replication to MariaDB Monitor

The 'reset_replication' module command deletes all slave connections and binlogs,
sets gtid to sequence 0 and restarts replication from the given master. Should be
only used if gtid:s are incompatible but the actual data is known to be in sync.
This commit is contained in:
Esa Korhonen
2018-09-04 12:23:19 +03:00
parent cb54880b99
commit 56c84541df
5 changed files with 231 additions and 3 deletions

View File

@ -489,6 +489,14 @@ public:
*/
bool disable_events(BinlogMode binlog_mode, json_t** error_out);
/**
* Stop and delete all slave connections.
*
* @param error_out Error output
* @return True if successful. If false, some connections may have been successfully deleted.
*/
bool reset_all_slave_conns(json_t** error_out);
private:
class EventInfo;
typedef std::function<void (const EventInfo&, json_t** error_out)> ManipulatorFunc;