Fix wfWaitForSlaves() so the $wiki parameter actually works correctly
authorPeter Gehres <pgehres@wikimedia.org>
Wed, 20 Mar 2013 21:21:16 +0000 (14:21 -0700)
committerPeter Gehres <pgehres@wikimedia.org>
Wed, 20 Mar 2013 21:25:38 +0000 (14:25 -0700)
Change-Id: I1f3da5921f2d724e10c448700ea8b958ff159451

includes/GlobalFunctions.php

index 99f5eb5..017ab7d 100644 (file)
@@ -3655,7 +3655,7 @@ function wfWaitForSlaves( $maxLag = false, $wiki = false ) {
        // 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 );
+               $dbw = $lb->getConnection( DB_MASTER, array(), $wiki );
                $pos = $dbw->getMasterPos();
                $lb->waitForAll( $pos );
        }