MXS-1744 Rename and clean up gtid code, move to separate file

Renamed the two gtid-classes to better match MariaDB documentation. One
domain-server-sequence-combination is now a "Gtid", as these identify
a transaction. A "GtidList" contains a list of Gtid:s for handling multi-domain
server variables composed of multiple comma separated Gtid:s.

Removed unused methods and renamed some existing ones. Moved the Gtid-code
to its own file.
This commit is contained in:
Esa Korhonen
2018-04-04 17:34:14 +03:00
parent e43678bed9
commit 174db469f3
9 changed files with 423 additions and 441 deletions

View File

@ -19,6 +19,7 @@
#include <memory>
#include <maxscale/monitor.h>
#include "utilities.hh"
#include "gtid.hh"
enum mysql_server_version
{
@ -47,7 +48,7 @@ public:
* reading from. */
uint64_t read_master_log_pos; /**< Position up to which the I/O thread has read in the current master
* binary log file. */
Gtid gtid_io_pos; /**< Gtid I/O position of the slave thread. */
GtidList gtid_io_pos; /**< Gtid I/O position of the slave thread. */
std::string last_error; /**< Last IO or SQL error encountered. */
SlaveStatusInfo();
@ -91,8 +92,8 @@ public:
time_t latest_event; /**< Time when latest event was received from the master */
int64_t gtid_domain_id; /**< The value of gtid_domain_id, the domain which is used for
* new non-replicated events. */
Gtid gtid_current_pos; /**< Gtid of latest event. */
Gtid gtid_binlog_pos; /**< Gtid of latest event written to binlog. */
GtidList gtid_current_pos; /**< Gtid of latest event. */
GtidList gtid_binlog_pos; /**< Gtid of latest event written to binlog. */
SlaveStatusInfo slave_status; /**< Data returned from SHOW SLAVE STATUS */
ReplicationSettings rpl_settings; /**< Miscellaneous replication related settings */