MediaWiki REL1_39
|
DBPrimaryPos implementation for MySQL and MariaDB. More...
Public Member Functions | |
__construct ( $position, $asOfTime) | |
__serialize () | |
__toString () | |
__unserialize ( $data) | |
asOfTime () | |
channelsMatch (DBPrimaryPos $pos) | |
getGTIDs () | |
getLogFile () | |
getLogPosition () | |
hasReached (DBPrimaryPos $pos) | |
serialize () | |
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. | |
unserialize ( $serialized) | |
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 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::__serialize | ( | ) |
Definition at line 326 of file MySQLPrimaryPos.php.
Wikimedia\Rdbms\MySQLPrimaryPos::__toString | ( | ) |
Implements Wikimedia\Rdbms\DBPrimaryPos.
Definition at line 372 of file MySQLPrimaryPos.php.
Wikimedia\Rdbms\MySQLPrimaryPos::__unserialize | ( | $data | ) |
Definition at line 340 of file MySQLPrimaryPos.php.
Wikimedia\Rdbms\MySQLPrimaryPos::asOfTime | ( | ) |
Implements Wikimedia\Rdbms\DBPrimaryPos.
Definition at line 101 of file MySQLPrimaryPos.php.
Referenced by Wikimedia\Rdbms\MySQLPrimaryPos\init().
Wikimedia\Rdbms\MySQLPrimaryPos::channelsMatch | ( | DBPrimaryPos | $pos | ) |
DBPrimaryPos | $pos |
Implements Wikimedia\Rdbms\DBPrimaryPos.
Definition at line 139 of file MySQLPrimaryPos.php.
References Wikimedia\Rdbms\MySQLPrimaryPos\getActiveGtidCoordinates(), Wikimedia\Rdbms\MySQLPrimaryPos\getBinlogCoordinates(), and true.
|
protected |
Definition at line 258 of file MySQLPrimaryPos.php.
References Wikimedia\Rdbms\MySQLPrimaryPos\parseGTID().
Referenced by Wikimedia\Rdbms\MySQLPrimaryPos\channelsMatch(), Wikimedia\Rdbms\MySQLPrimaryPos\getRelevantActiveGTIDs(), and Wikimedia\Rdbms\MySQLPrimaryPos\hasReached().
|
protected |
Definition at line 316 of file MySQLPrimaryPos.php.
Referenced by Wikimedia\Rdbms\MySQLPrimaryPos\channelsMatch(), and Wikimedia\Rdbms\MySQLPrimaryPos\hasReached().
Wikimedia\Rdbms\MySQLPrimaryPos::getGTIDs | ( | ) |
Definition at line 183 of file MySQLPrimaryPos.php.
Wikimedia\Rdbms\MySQLPrimaryPos::getLogFile | ( | ) |
Definition at line 174 of file MySQLPrimaryPos.php.
Wikimedia\Rdbms\MySQLPrimaryPos::getLogPosition | ( | ) |
Definition at line 166 of file MySQLPrimaryPos.php.
|
static |
MySQLPrimaryPos | $pos | |
MySQLPrimaryPos | $refPos |
Definition at line 245 of file MySQLPrimaryPos.php.
References Wikimedia\Rdbms\MySQLPrimaryPos\getActiveGtidCoordinates().
Wikimedia\Rdbms\MySQLPrimaryPos::hasReached | ( | DBPrimaryPos | $pos | ) |
DBPrimaryPos | $pos |
Implements Wikimedia\Rdbms\DBPrimaryPos.
Definition at line 105 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 357 of file MySQLPrimaryPos.php.
|
staticprotected |
string | $id | GTID |
Definition at line 289 of file MySQLPrimaryPos.php.
Referenced by Wikimedia\Rdbms\MySQLPrimaryPos\getActiveGtidCoordinates(), and Wikimedia\Rdbms\MySQLPrimaryPos\init().
Wikimedia\Rdbms\MySQLPrimaryPos::serialize | ( | ) |
Definition at line 322 of file MySQLPrimaryPos.php.
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 199 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 216 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 233 of file MySQLPrimaryPos.php.
Wikimedia\Rdbms\MySQLPrimaryPos::toArray | ( | ) |
Serialization for storage.
Implements Wikimedia\Rdbms\DBPrimaryPos.
Definition at line 363 of file MySQLPrimaryPos.php.
Wikimedia\Rdbms\MySQLPrimaryPos::unserialize | ( | $serialized | ) |
Definition at line 336 of file MySQLPrimaryPos.php.