rdbms: remove obsolete getReplicaPos() code
authorAaron Schulz <aschulz@wikimedia.org>
Wed, 7 Feb 2018 01:18:00 +0000 (17:18 -0800)
committerAaron Schulz <aschulz@wikimedia.org>
Wed, 7 Feb 2018 01:18:00 +0000 (17:18 -0800)
Also fixed incorrect comment for getGtidCoordinates()

Change-Id: Ie2ce8a8bba230ceb6d068957e5ffeb360c3fe473

includes/libs/rdbms/database/DatabaseMysqlBase.php
includes/libs/rdbms/database/position/MySQLMasterPos.php

index 6a545ce..208f506 100644 (file)
@@ -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__ );
index 0657cf3..9ca6b11 100644 (file)
@@ -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 = [];