From: Andrew Garrett Date: Tue, 9 Dec 2008 15:00:17 +0000 (+0000) Subject: DB layer compatibility with MySQL 5+ - allow both >Exec_master_log_pos and ->Exec_Mas... X-Git-Tag: 1.31.0-rc.0~44088 X-Git-Url: http://git.cyclocoop.org/%22.%24redirect_annul.%22?a=commitdiff_plain;h=c2ac8f8dfb4fcc36a0c355d682b6a8cc03beae62;p=lhc%2Fweb%2Fwiklou.git DB layer compatibility with MySQL 5+ - allow both >Exec_master_log_pos and ->Exec_Master_Log_Pos in SHOW SLAVE STATUS. --- diff --git a/includes/db/Database.php b/includes/db/Database.php index 83561d3782..e4c41a8951 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -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; }