MediaWiki REL1_40
|
DBPrimaryPos implementation for MySQL and MariaDB. More...
Inherits Wikimedia\Rdbms\DBPrimaryPos.
Public Member Functions | |
__construct ( $position, $asOfTime) | |
__toString () | |
asOfTime () | |
getGTIDs () | |
getLogFile () | |
getLogPosition () | |
hasReached (DBPrimaryPos $pos) | |
setActiveDomain ( $id) | |
Set the GTID domain known to be used in new commits on a replication stream of interest. | |
setActiveOriginServerId ( $id) | |
Set the server ID known to be used in new commits on a replication stream of interest. | |
setActiveOriginServerUUID ( $id) | |
Set the server UUID known to be used in new commits on a replication stream of interest. | |
toArray () | |
Serialization for storage. | |
Static Public Member Functions | |
static | getRelevantActiveGTIDs (MySQLPrimaryPos $pos, MySQLPrimaryPos $refPos) |
static | newFromArray (array $data) |
Deserialization from storage. | |
Protected Member Functions | |
getActiveGtidCoordinates () | |
getBinlogCoordinates () | |
init ( $position, $asOfTime) | |
Static Protected Member Functions | |
static | parseGTID ( $id) |
DBPrimaryPos implementation for MySQL and MariaDB.
Note that primary positions and sync logic here make some assumptions:
Definition at line 20 of file MySQLPrimaryPos.php.
Wikimedia\Rdbms\MySQLPrimaryPos::__construct | ( | $position, | |
$asOfTime ) |
string | $position | One of (comma separated GTID list, <binlog file>/<64 bit integer>) |
float | $asOfTime | UNIX timestamp |
Definition at line 51 of file MySQLPrimaryPos.php.
References Wikimedia\Rdbms\MySQLPrimaryPos\init().
Wikimedia\Rdbms\MySQLPrimaryPos::__toString | ( | ) |
Implements Wikimedia\Rdbms\DBPrimaryPos.
Definition at line 327 of file MySQLPrimaryPos.php.
Wikimedia\Rdbms\MySQLPrimaryPos::asOfTime | ( | ) |
Implements Wikimedia\Rdbms\DBPrimaryPos.
Definition at line 100 of file MySQLPrimaryPos.php.
Referenced by Wikimedia\Rdbms\MySQLPrimaryPos\init().
|
protected |
Definition at line 234 of file MySQLPrimaryPos.php.
References Wikimedia\Rdbms\MySQLPrimaryPos\parseGTID().
Referenced by Wikimedia\Rdbms\MySQLPrimaryPos\getRelevantActiveGTIDs(), and Wikimedia\Rdbms\MySQLPrimaryPos\hasReached().
|
protected |
Definition at line 292 of file MySQLPrimaryPos.php.
Referenced by Wikimedia\Rdbms\MySQLPrimaryPos\hasReached().
Wikimedia\Rdbms\MySQLPrimaryPos::getGTIDs | ( | ) |
Definition at line 159 of file MySQLPrimaryPos.php.
Wikimedia\Rdbms\MySQLPrimaryPos::getLogFile | ( | ) |
Definition at line 150 of file MySQLPrimaryPos.php.
Wikimedia\Rdbms\MySQLPrimaryPos::getLogPosition | ( | ) |
Definition at line 142 of file MySQLPrimaryPos.php.
|
static |
MySQLPrimaryPos | $pos | |
MySQLPrimaryPos | $refPos |
Definition at line 221 of file MySQLPrimaryPos.php.
References Wikimedia\Rdbms\MySQLPrimaryPos\getActiveGtidCoordinates().
Wikimedia\Rdbms\MySQLPrimaryPos::hasReached | ( | DBPrimaryPos | $pos | ) |
DBPrimaryPos | $pos |
Implements Wikimedia\Rdbms\DBPrimaryPos.
Definition at line 104 of file MySQLPrimaryPos.php.
References Wikimedia\Rdbms\MySQLPrimaryPos\getActiveGtidCoordinates(), and Wikimedia\Rdbms\MySQLPrimaryPos\getBinlogCoordinates().
|
protected |
string | $position | |
float | $asOfTime |
Definition at line 59 of file MySQLPrimaryPos.php.
References Wikimedia\Rdbms\MySQLPrimaryPos\asOfTime(), and Wikimedia\Rdbms\MySQLPrimaryPos\parseGTID().
Referenced by Wikimedia\Rdbms\MySQLPrimaryPos\__construct().
|
static |
Deserialization from storage.
array | $data | Representation as returned from ::toArray() |
Implements Wikimedia\Rdbms\DBPrimaryPos.
Definition at line 298 of file MySQLPrimaryPos.php.
|
staticprotected |
string | $id | GTID |
Definition at line 265 of file MySQLPrimaryPos.php.
Referenced by Wikimedia\Rdbms\MySQLPrimaryPos\getActiveGtidCoordinates(), and Wikimedia\Rdbms\MySQLPrimaryPos\init().
Wikimedia\Rdbms\MySQLPrimaryPos::setActiveDomain | ( | $id | ) |
Set the GTID domain known to be used in new commits on a replication stream of interest.
This makes getRelevantActiveGTIDs() filter out GTIDs from other domains
string | int | null | $id | @gtid_domain_id of the active replication stream |
Definition at line 175 of file MySQLPrimaryPos.php.
Wikimedia\Rdbms\MySQLPrimaryPos::setActiveOriginServerId | ( | $id | ) |
Set the server ID known to be used in new commits on a replication stream of interest.
This makes getRelevantActiveGTIDs() filter out GTIDs from other origin servers
string | int | null | $id | @server_id of the server were writes originate |
Definition at line 192 of file MySQLPrimaryPos.php.
Wikimedia\Rdbms\MySQLPrimaryPos::setActiveOriginServerUUID | ( | $id | ) |
Set the server UUID known to be used in new commits on a replication stream of interest.
This makes getRelevantActiveGTIDs() filter out GTIDs from other origin servers
string | null | $id | @server_uuid of the server were writes originate |
Definition at line 209 of file MySQLPrimaryPos.php.
Wikimedia\Rdbms\MySQLPrimaryPos::toArray | ( | ) |
Serialization for storage.
Implements Wikimedia\Rdbms\DBPrimaryPos.
Definition at line 313 of file MySQLPrimaryPos.php.