rdbms: fix active GTID filtering in DatabaseMysqlBase
authorAaron Schulz <aschulz@wikimedia.org>
Wed, 19 Jun 2019 08:10:15 +0000 (09:10 +0100)
committerMobrovac <mobrovac@wikimedia.org>
Wed, 25 Sep 2019 11:59:05 +0000 (11:59 +0000)
commit8f20122c18bac0bc051f7a1cebdee3d21cc1d588
treeb174f8c691b1c2b9f082a315434e468daf7f15e9
parentf704207ba129198e21ada72c2961e5bd26ac3227
rdbms: fix active GTID filtering in DatabaseMysqlBase

In masterPosWait(), only $pos will have the known active domain/server set
since it usually comes from getMasterPos(). However, the reference position,
from getReplicaDB(), does not have the active domains set since querying
gtid_domain_id on the replica would be incorrect and getting a connection
to the master could be expensive.

Remove obsolete hacks for jobs that used to store master positions.

Also, use the regular Database::query() method for stylistic consistency.

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