From: Aaron Schulz Date: Wed, 29 Oct 2014 23:36:55 +0000 (-0700) Subject: Fixed possible db error log spam when cluster=* in wfWaitForSlaves() X-Git-Tag: 1.31.0-rc.0~13449 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=5e5bf769fef92fbf2cbbe99b8c9de8f8474d31e0;p=lhc%2Fweb%2Fwiklou.git Fixed possible db error log spam when cluster=* in wfWaitForSlaves() Change-Id: Idd385cddb0fa9f56bddc46d41ae584ca65bc45ed --- diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 379335ab5a..cc7086c943 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -3729,7 +3729,9 @@ function wfWaitForSlaves( if ( $ifWritesSince && !$lb->hasMasterConnection() ) { continue; // assume no writes done } - $dbw = $lb->getConnection( DB_MASTER, array(), $wiki ); + // Use the empty string to not trigger selectDB() since the connection + // may have been to a server that does not have a DB for the current wiki. + $dbw = $lb->getConnection( DB_MASTER, array(), '' ); if ( $ifWritesSince && $dbw->lastDoneWrites() < $ifWritesSince ) { continue; // no writes since the last wait }