From 319ace81250b97dff0e6ee6df4b1f570f468bf5c Mon Sep 17 00:00:00 2001 From: Catrope Date: Wed, 20 Mar 2013 17:43:44 -0700 Subject: [PATCH] Fix wfWaitForSlaves() for foreign DBs We thought we'd fixed it previously, but the LB now connects to the foreign slaves and tries to select $wgDBname. Fixing this by having doWait() open connections that don't select any DB name, by passing the empty string as the DB name. This is an undocumented feature in the DatabaseMysql constructor, apparently. Change-Id: Icc5594143a3eaa31170a7fc8c93d429c1a7dd575 --- includes/db/LoadBalancer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/db/LoadBalancer.php b/includes/db/LoadBalancer.php index 1e85927826..187870fdbe 100644 --- a/includes/db/LoadBalancer.php +++ b/includes/db/LoadBalancer.php @@ -407,7 +407,7 @@ class LoadBalancer { wfDebug( __METHOD__ . ": no connection open\n" ); return false; } else { - $conn = $this->openConnection( $index ); + $conn = $this->openConnection( $index, '' ); if ( !$conn ) { wfDebug( __METHOD__ . ": failed to open connection\n" ); return false; -- 2.20.1