MXS-1533: Better handling of multi-domain gtids

If the gtid_domain_pos of the master is ever modified,
gtid-variables will have multiple domains. Generally, we are
only interested in the most recent domain. This is tracked in
gtid_domain_id:s and the value of the master is used for
filtering the correct domain from all gtid-values.

Also, use gtid_current_pos instead of gtid_slave_pos. The
advantage of current_pos is that the same variable works also
for master servers. The gtid-handling is now more thorough and
detects some weird situations.
This commit is contained in:
Esa Korhonen
2017-11-23 11:45:08 +02:00
parent 15e330e127
commit 23cd294dad
2 changed files with 104 additions and 46 deletions

View File

@ -71,6 +71,7 @@ typedef struct
char* replication_password; /**< Replication password for failover*/
bool verify_master_failure; /**< Whether master failure is verified via slaves */
int master_failure_timeout; /**< Time in seconds to wait before doing failover */
int64_t master_gtid_domain; /**< Gtid domain currently used by the master */
MXS_MONITOR* monitor;
} MYSQL_MONITOR;