Index: trunk/phase3/includes/LoadBalancer.php |
— | — | @@ -364,7 +364,9 @@ |
365 | 365 | } |
366 | 366 | |
367 | 367 | # Query groups |
368 | | - if ( !is_array( $groups ) ) { |
| 368 | + if ( $i == DB_MASTER ) { |
| 369 | + $i = $this->getWriterIndex(); |
| 370 | + } elseif ( !is_array( $groups ) ) { |
369 | 371 | $groupIndex = $this->getReaderIndex( $groups, $wiki ); |
370 | 372 | if ( $groupIndex !== false ) { |
371 | 373 | $serverName = $this->getServerName( $groupIndex ); |
— | — | @@ -386,8 +388,6 @@ |
387 | 389 | # Operation-based index |
388 | 390 | if ( $i == DB_SLAVE ) { |
389 | 391 | $i = $this->getReaderIndex( false, $wiki ); |
390 | | - } elseif ( $i == DB_MASTER ) { |
391 | | - $i = $this->getWriterIndex(); |
392 | 392 | } elseif ( $i == DB_LAST ) { |
393 | 393 | # Just use $this->mLastIndex, which should already be set |
394 | 394 | $i = $this->mLastIndex; |
Index: trunk/extensions/CentralAuth/CentralAuthUser.php |
— | — | @@ -24,7 +24,7 @@ |
25 | 25 | } |
26 | 26 | |
27 | 27 | public static function getCentralDB() { |
28 | | - return wfGetLB( 'centralauth' )->getConnection( DB_MASTER, 'centralauth', 'centralauth' ); |
| 28 | + return wfGetLB( 'centralauth' )->getConnection( DB_MASTER, array(), 'centralauth' ); |
29 | 29 | } |
30 | 30 | |
31 | 31 | public static function getCentralSlaveDB() { |