Merge "rdbms: use Database::getDomainId for transaction logging calls"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 16 Aug 2018 05:54:35 +0000 (05:54 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 16 Aug 2018 05:54:35 +0000 (05:54 +0000)
1  2 
includes/libs/rdbms/database/Database.php

@@@ -1132,11 -1132,11 +1132,11 @@@ abstract class Database implements IDat
                if ( $this->trxLevel && !$this->trxDoneWrites && $isWrite ) {
                        $this->trxDoneWrites = true;
                        $this->trxProfiler->transactionWritingIn(
-                               $this->server, $this->dbName, $this->trxShortId );
+                               $this->server, $this->getDomainID(), $this->trxShortId );
                }
  
                if ( $this->getFlag( self::DBO_DEBUG ) ) {
-                       $this->queryLogger->debug( "{$this->dbName} {$commentedSql}" );
+                       $this->queryLogger->debug( "{$this->getDomainID()} {$commentedSql}" );
                }
  
                # Send the query to the server and fetch any corresponding errors
                        $this->lastWriteTime = microtime( true );
                        $this->trxProfiler->transactionWritingOut(
                                $this->server,
-                               $this->dbName,
+                               $this->getDomainID(),
                                $this->trxShortId,
                                $writeTime,
                                $this->trxWriteAffectedRows
                        if ( $this->trxDoneWrites ) {
                                $this->trxProfiler->transactionWritingOut(
                                        $this->server,
-                                       $this->dbName,
+                                       $this->getDomainID(),
                                        $this->trxShortId,
                                        $writeTime,
                                        $this->trxWriteAffectedRows
         */
        public function __clone() {
                $this->connLogger->warning(
 -                      "Cloning " . static::class . " is not recomended; forking connection:\n" .
 +                      "Cloning " . static::class . " is not recommended; forking connection:\n" .
                        ( new RuntimeException() )->getTraceAsString()
                );