Index: trunk/phase3/maintenance/updateCollation.php |
— | — | @@ -48,9 +48,13 @@ |
49 | 49 | |
50 | 50 | public function syncDBs() { |
51 | 51 | $lb = wfGetLB(); |
52 | | - $dbw = $lb->getConnection( DB_MASTER ); |
53 | | - $pos = $dbw->getMasterPos(); |
54 | | - $lb->waitForAll( $pos ); |
| 52 | + // bug 27975 - Don't try to wait for slaves if there are none |
| 53 | + // Prevents permission error when getting master position |
| 54 | + if ( $lb->getServerCount() > 1 ) { |
| 55 | + $dbw = $lb->getConnection( DB_MASTER ); |
| 56 | + $pos = $dbw->getMasterPos(); |
| 57 | + $lb->waitForAll( $pos ); |
| 58 | + } |
55 | 59 | } |
56 | 60 | |
57 | 61 | public function execute() { |