|
MediaWiki master
|
DBPrimaryPos implementation for MySQL and MariaDB. More...
Inherits Stringable, and 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.
| ||||
Public Attributes | |
| const | CORD_EVENT = 1 |
| Key name of the 64 bit binary log event number of a position tuple. | |
| const | CORD_INDEX = 0 |
| Key name of the 6 digit binary log index number of a position tuple. | |
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 21 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 52 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 96 of file MySQLPrimaryPos.php.
Referenced by Wikimedia\Rdbms\MySQLPrimaryPos\init().
|
protected |
Definition at line 231 of file MySQLPrimaryPos.php.
References Wikimedia\Rdbms\MySQLPrimaryPos\parseGTID().
Referenced by Wikimedia\Rdbms\MySQLPrimaryPos\getRelevantActiveGTIDs(), and Wikimedia\Rdbms\MySQLPrimaryPos\hasReached().
|
protected |
Definition at line 291 of file MySQLPrimaryPos.php.
Referenced by Wikimedia\Rdbms\MySQLPrimaryPos\hasReached().
| Wikimedia\Rdbms\MySQLPrimaryPos::getGTIDs | ( | ) |
Definition at line 156 of file MySQLPrimaryPos.php.
| Wikimedia\Rdbms\MySQLPrimaryPos::getLogFile | ( | ) |
Definition at line 147 of file MySQLPrimaryPos.php.
| Wikimedia\Rdbms\MySQLPrimaryPos::getLogPosition | ( | ) |
Definition at line 139 of file MySQLPrimaryPos.php.
|
static |
| MySQLPrimaryPos | $pos | |
| MySQLPrimaryPos | $refPos |
Definition at line 218 of file MySQLPrimaryPos.php.
References Wikimedia\Rdbms\MySQLPrimaryPos\getActiveGtidCoordinates().
| Wikimedia\Rdbms\MySQLPrimaryPos::hasReached | ( | DBPrimaryPos | $pos | ) |
| DBPrimaryPos | $pos |
Implements Wikimedia\Rdbms\DBPrimaryPos.
Definition at line 101 of file MySQLPrimaryPos.php.
References Wikimedia\Rdbms\MySQLPrimaryPos\getActiveGtidCoordinates(), and Wikimedia\Rdbms\MySQLPrimaryPos\getBinlogCoordinates().
|
protected |
| string | $position | |
| float | $asOfTime |
Definition at line 60 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 262 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 172 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 189 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 206 of file MySQLPrimaryPos.php.
| Wikimedia\Rdbms\MySQLPrimaryPos::toArray | ( | ) |
Serialization for storage.
Implements Wikimedia\Rdbms\DBPrimaryPos.
Definition at line 313 of file MySQLPrimaryPos.php.
| const Wikimedia\Rdbms\MySQLPrimaryPos::CORD_EVENT = 1 |
Key name of the 64 bit binary log event number of a position tuple.
Definition at line 46 of file MySQLPrimaryPos.php.
| const Wikimedia\Rdbms\MySQLPrimaryPos::CORD_INDEX = 0 |
Key name of the 6 digit binary log index number of a position tuple.
Definition at line 44 of file MySQLPrimaryPos.php.