rdbms: make getMasterPos() ignore GTIDs outside of gtid_domain_id
authorAaron Schulz <aschulz@wikimedia.org>
Wed, 7 Feb 2018 10:15:54 +0000 (02:15 -0800)
committerAaron Schulz <aschulz@wikimedia.org>
Thu, 22 Mar 2018 23:53:05 +0000 (23:53 +0000)
commitceb7d61ee7ef3edc6705abd41ec86b3afcd9c491
tree78748eb33af2419d3e7b4e34084afa106eec708e
parente67ca3a31c929d15dcbf988fa582a9e9322c7e2a
rdbms: make getMasterPos() ignore GTIDs outside of gtid_domain_id

* Filter out GTIDs with a domain that is not the one binlog
  events would be written to if the Database handle was given
  write queries. Likewise for the MariaDB server_id component.
* Also improve MySQL GTID support to better match that of MariaDB.
  This covers position retrieval, replication waiting, and ranges
  in GTIDs (which are almost always present).
* Make some MySQLMasterPos variables private by making use of
  accesors instead.
* Store the gtids array keyed by domain ID for convenience.
* Clean up dynamic call to static method.

Change-Id: Ic6ab517bc8f200c968ff892ade69ad1b9394ab21
includes/libs/rdbms/database/DatabaseMysqlBase.php
includes/libs/rdbms/database/position/MySQLMasterPos.php
tests/phpunit/includes/libs/rdbms/database/DatabaseMysqlBaseTest.php