Merge "Set an initial dummy domain in Database::__construct()"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 20 Sep 2016 19:23:12 +0000 (19:23 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 20 Sep 2016 19:23:12 +0000 (19:23 +0000)
1  2 
includes/libs/rdbms/database/Database.php

@@@ -266,11 -270,20 +266,14 @@@ abstract class Database implements IDat
                        ? $params['srvCache']
                        : new HashBagOStuff();
  
 -              $this->profiler = isset( $params['profiler'] ) ? $params['profiler'] : null;
 -              $this->trxProfiler = isset( $params['trxProfiler'] )
 -                      ? $params['trxProfiler']
 -                      : new TransactionProfiler();
 -              $this->connLogger = isset( $params['connLogger'] )
 -                      ? $params['connLogger']
 -                      : new \Psr\Log\NullLogger();
 -              $this->queryLogger = isset( $params['queryLogger'] )
 -                      ? $params['queryLogger']
 -                      : new \Psr\Log\NullLogger();
 +              $this->profiler = $params['profiler'];
 +              $this->trxProfiler = $params['trxProfiler'];
 +              $this->connLogger = $params['connLogger'];
 +              $this->queryLogger = $params['queryLogger'];
  
+               // Set initial dummy domain until open() sets the final DB/prefix
+               $this->currentDomain = DatabaseDomain::newUnspecified();
                if ( $user ) {
                        $this->open( $server, $user, $password, $dbName );
                } elseif ( $this->requiresDatabaseUser() ) {