DB layer compatibility with MySQL 5+ - allow both >Exec_master_log_pos and ->Exec_Mas...
authorAndrew Garrett <werdna@users.mediawiki.org>
Tue, 9 Dec 2008 15:00:17 +0000 (15:00 +0000)
committerAndrew Garrett <werdna@users.mediawiki.org>
Tue, 9 Dec 2008 15:00:17 +0000 (15:00 +0000)
includes/db/Database.php

index 83561d3..e4c41a8 100644 (file)
@@ -1931,7 +1931,8 @@ class Database {
                $res = $this->query( 'SHOW SLAVE STATUS', 'Database::getSlavePos' );
                $row = $this->fetchObject( $res );
                if ( $row ) {
-                       return new MySQLMasterPos( $row->Relay_Master_Log_File, $row->Exec_master_log_pos );
+                       $pos = isset($row->Exec_master_log_pos) ? $row->Exec_master_log_pos : $row->Exec_Master_Log_Pos;
+                       return new MySQLMasterPos( $row->Relay_Master_Log_File, $pos );
                } else {
                        return false;
                }