5use InvalidArgumentException;
6use UnexpectedValueException;
60 if (
preg_match(
'!^(.+)\.(\d+)/(\d+)$!', $position, $m ) ) {
61 $this->binLog = $m[1];
62 $this->logPos = [ self::CORD_INDEX => (
int)$m[2], self::CORD_EVENT => (
int)$m[3] ];
66 foreach (
$gtids as $gtid ) {
69 throw new InvalidArgumentException(
"Invalid GTID '$gtid'." );
73 if (
isset( $this->gtids[$domain] ) ) {
78 if ( $pos > $otherPos ) {
79 $this->gtids[$domain] =
$gtid;
82 $this->gtids[$domain] =
$gtid;
91 if ( !$this->gtids ) {
92 throw new InvalidArgumentException(
"GTID set cannot be empty." );
104 if ( !( $pos instanceof
self ) ) {
105 throw new InvalidArgumentException(
"Position not an instance of " . __CLASS__ );
110 $thatPosByDomain = $pos->getActiveGtidCoordinates();
111 if ( $thisPosByDomain && $thatPosByDomain ) {
114 foreach ( $thatPosByDomain as $domain => $thatPos ) {
115 if (
isset( $thisPosByDomain[$domain] ) ) {
116 $comparisons[] = ( $thatPos <= $thisPosByDomain[$domain] );
123 return ( $comparisons && !
in_array(
false, $comparisons,
true ) );
128 $thatBinPos = $pos->getBinlogCoordinates();
129 if ( $thisBinPos && $thatBinPos && $thisBinPos[
'binlog'] === $thatBinPos[
'binlog'] ) {
130 return ( $thisBinPos[
'pos'] >= $thatBinPos[
'pos'] );
138 if ( !( $pos instanceof
self ) ) {
139 throw new InvalidArgumentException(
"Position not an instance of " . __CLASS__ );
144 $thatPosDomains =
array_keys( $pos->getActiveGtidCoordinates() );
145 if ( $thisPosDomains && $thatPosDomains ) {
155 $thatBinPos = $pos->getBinlogCoordinates();
157 return ( $thisBinPos && $thatBinPos && $thisBinPos[
'binlog'] === $thatBinPos[
'binlog'] );
181 return $this->gtids ?
null :
"{$this->binLog}.{$this->logPos[self::CORD_INDEX]}";
197 $this->activeDomain = (
int)$id;
205 $this->activeServerId = (
int)$id;
213 $this->activeServerUUID = $id;
236 foreach ( $this->gtids as $domain => $gtid ) {
241 if ( $this->
style === self::GTID_MARIA && $this->activeDomain !==
null ) {
245 if ( $this->
style === self::GTID_MARIA && $this->activeServerId !==
null ) {
247 }
elseif ( $this->
style === self::GTID_MYSQL && $this->activeServerUUID !==
null ) {
252 $gtidInfos[$domain] = $pos;
265 if (
preg_match(
'!^(\d+)-(\d+)-(\d+)$!', $id, $m ) ) {
267 return [ (
int)$m[1], (
int)$m[3], (
int)$m[2] ];
268 }
elseif (
preg_match(
'!^(\w{8}-\w{4}-\w{4}-\w{4}-\w{12}):(?:\d+-|)(\d+)$!', $id, $m ) ) {
273 return [ $m[1], (
int)$m[2], $m[1] ];
285 return ( $this->binLog !==
null && $this->logPos !==
null )
293 'activeDomain' => $this->activeDomain,
294 'activeServerId' => $this->activeServerId,
295 'activeServerUUID' => $this->activeServerUUID,
303 throw new UnexpectedValueException( __METHOD__ .
": cannot unserialize position" );
323 ? implode(
',', $this->gtids )
324 : $this->
getLogFile() .
"/{$this->logPos[self::CORD_EVENT]}";
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
deferred txt A few of the database updates required by various functions here can be deferred until after the result page is displayed to the user For updating the view updating the linked to tables after a etc PHP does not yet have any way to tell the server to actually return and disconnect while still running these but it might have such a feature in the future We handle these by creating a deferred update object and putting those objects on a global list
this hook is for auditing only or null if authentication failed before getting that far or null if we can t even determine that When $user is not null
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return true
$data
Utility to generate mapping file used in mw.Title (phpCharToUpper.json)
foreach( $res as $row) $serialized