* @throws MWException
*/
protected function getDB( $serverIndex ) {
- global $wgDebugDBTransactions;
-
if ( !isset( $this->conns[$serverIndex] ) ) {
if ( $serverIndex >= $this->numServers ) {
throw new MWException( __METHOD__ . ": Invalid server index \"$serverIndex\"" );
# If server connection info was given, use that
if ( $this->serverInfos ) {
- if ( $wgDebugDBTransactions ) {
- $this->logger->debug( "Using provided serverInfo for SqlBagOStuff" );
- }
$info = $this->serverInfos[$serverIndex];
$type = isset( $info['type'] ) ? $info['type'] : 'mysql';
$host = isset( $info['host'] ) ? $info['host'] : '[unknown]';
$db = wfGetDB( $index );
}
}
- if ( $wgDebugDBTransactions ) {
- $this->logger->debug( sprintf( "Connection %s will be used for SqlBagOStuff", $db ) );
- }
+ $this->logger->debug( sprintf( "Connection %s will be used for SqlBagOStuff", $db ) );
$this->conns[$serverIndex] = $db;
}