From c2ac8f8dfb4fcc36a0c355d682b6a8cc03beae62 Mon Sep 17 00:00:00 2001 From: Andrew Garrett Date: Tue, 9 Dec 2008 15:00:17 +0000 Subject: [PATCH] DB layer compatibility with MySQL 5+ - allow both >Exec_master_log_pos and ->Exec_Master_Log_Pos in SHOW SLAVE STATUS. --- includes/db/Database.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- 2.20.1