From: Aaron Schulz Date: Wed, 7 Feb 2018 01:18:00 +0000 (-0800) Subject: rdbms: remove obsolete getReplicaPos() code X-Git-Tag: 1.31.0-rc.0~674^2 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=8f45d13fe12f40396a564f24fce48c7d8cf80b26 rdbms: remove obsolete getReplicaPos() code Also fixed incorrect comment for getGtidCoordinates() Change-Id: Ie2ce8a8bba230ceb6d068957e5ffeb360c3fe473 --- diff --git a/includes/libs/rdbms/database/DatabaseMysqlBase.php b/includes/libs/rdbms/database/DatabaseMysqlBase.php index 6a545ceb2d..208f506520 100644 --- a/includes/libs/rdbms/database/DatabaseMysqlBase.php +++ b/includes/libs/rdbms/database/DatabaseMysqlBase.php @@ -942,9 +942,7 @@ abstract class DatabaseMysqlBase extends Database { $row = $this->fetchObject( $res ); if ( $row ) { - $pos = isset( $row->Exec_master_log_pos ) - ? $row->Exec_master_log_pos - : $row->Exec_Master_Log_Pos; + $pos = $row->Exec_Master_Log_Pos; // Also fetch the last-applied GTID set (MariaDB) if ( $this->useGTIDs ) { $res = $this->query( "SHOW GLOBAL VARIABLES LIKE 'gtid_slave_pos'", __METHOD__ ); diff --git a/includes/libs/rdbms/database/position/MySQLMasterPos.php b/includes/libs/rdbms/database/position/MySQLMasterPos.php index 0657cf3dc0..9ca6b111eb 100644 --- a/includes/libs/rdbms/database/position/MySQLMasterPos.php +++ b/includes/libs/rdbms/database/position/MySQLMasterPos.php @@ -99,7 +99,7 @@ class MySQLMasterPos implements DBMasterPos { * @note: this returns false for multi-source replication GTID sets * @see https://mariadb.com/kb/en/mariadb/gtid * @see https://dev.mysql.com/doc/refman/5.6/en/replication-gtids-concepts.html - * @return array Map of (domain => integer position) or false + * @return array Map of (domain => integer position); possibly empty */ protected function getGtidCoordinates() { $gtidInfos = [];