* @see https://dev.mysql.com/doc/refman/5.6/en/replication-gtids-concepts.html
*/
class MySQLMasterPos implements DBMasterPos {
- /** @var int One of (BINARY_LOG, GTID_MYSQL, GTID_MARIA) */
+ /** @var string One of (BINARY_LOG, GTID_MYSQL, GTID_MARIA) */
private $style;
/** @var string|null Base name of all Binary Log files */
private $binLog;
}
public function serialize() {
- return serialize( [ 'position' => $this->__toString(), 'asOfTime' => $this->asOfTime ] );
+ return serialize( [
+ 'position' => $this->__toString(),
+ 'activeDomain' => $this->activeDomain,
+ 'activeServerId' => $this->activeServerId,
+ 'activeServerUUID' => $this->activeServerUUID,
+ 'asOfTime' => $this->asOfTime
+ ] );
}
public function unserialize( $serialized ) {
}
$this->init( $data['position'], $data['asOfTime'] );
+ if ( isset( $data['activeDomain'] ) ) {
+ $this->setActiveDomain( $data['activeDomain'] );
+ }
+ if ( isset( $data['activeServerId'] ) ) {
+ $this->setActiveOriginServerId( $data['activeServerId'] );
+ }
+ if ( isset( $data['activeServerUUID'] ) ) {
+ $this->setActiveOriginServerUUID( $data['activeServerUUID'] );
+ }
}
/**