From 5e5bf769fef92fbf2cbbe99b8c9de8f8474d31e0 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Wed, 29 Oct 2014 16:36:55 -0700 Subject: [PATCH] Fixed possible db error log spam when cluster=* in wfWaitForSlaves() Change-Id: Idd385cddb0fa9f56bddc46d41ae584ca65bc45ed --- includes/GlobalFunctions.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 } -- 2.20.1