From a38fd53df27b5e0e39178b8de5b662e5c2dbeac8 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Mon, 14 Mar 2011 09:30:56 +0000 Subject: [PATCH] (bug 27975) Fix r83529 (slave catchup in updateCollation.php) to not try to wait for slaves if there are none. Reporter was getting a permission error for getting the master position on a single-server setup --- maintenance/updateCollation.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/maintenance/updateCollation.php b/maintenance/updateCollation.php index 30b95a53de..2a01da412b 100644 --- a/maintenance/updateCollation.php +++ b/maintenance/updateCollation.php @@ -48,9 +48,13 @@ TEXT; public function syncDBs() { $lb = wfGetLB(); - $dbw = $lb->getConnection( DB_MASTER ); - $pos = $dbw->getMasterPos(); - $lb->waitForAll( $pos ); + // bug 27975 - Don't try to wait for slaves if there are none + // Prevents permission error when getting master position + if ( $lb->getServerCount() > 1 ) { + $dbw = $lb->getConnection( DB_MASTER ); + $pos = $dbw->getMasterPos(); + $lb->waitForAll( $pos ); + } } public function execute() { -- 2.20.1