Merge "includes/libs: Replace implicit Bugzilla bug numbers with Phab ones"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 28 Feb 2017 00:50:30 +0000 (00:50 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 28 Feb 2017 00:50:31 +0000 (00:50 +0000)
1  2 
includes/libs/rdbms/database/Database.php
includes/libs/rdbms/database/DatabasePostgres.php
includes/libs/rdbms/lbfactory/LBFactory.php

@@@ -846,7 -846,7 +846,7 @@@ abstract class Database implements IDat
                }
  
                // Add trace comment to the begin of the sql string, right after the operator.
-               // Or, for one-word queries (like "BEGIN" or COMMIT") add it to the end (bug 42598)
+               // Or, for one-word queries (like "BEGIN" or COMMIT") add it to the end (T44598)
                $commentedSql = preg_replace( '/\s|$/', " /* $fname {$this->agent} */ ", $sql, 1 );
  
                # Start implicit transactions that wrap the request if DBO_TRX is enabled
  
        private function handleSessionLoss() {
                $this->mTrxLevel = 0;
-               $this->mTrxIdleCallbacks = []; // bug 65263
-               $this->mTrxPreCommitCallbacks = []; // bug 65263
+               $this->mTrxIdleCallbacks = []; // T67263
+               $this->mTrxPreCommitCallbacks = []; // T67263
                $this->mSessionTempTables = [];
                $this->mNamedLocksHeld = [];
                try {
  
                $preLimitTail .= $this->makeOrderBy( $options );
  
 -              // if (isset($options['LIMIT'])) {
 -              //      $tailOpts .= $this->limitResult('', $options['LIMIT'],
 -              //              isset($options['OFFSET']) ? $options['OFFSET']
 -              //              : false);
 -              // }
 -
                if ( isset( $noKeyOptions['FOR UPDATE'] ) ) {
                        $postLimitTail .= ' FOR UPDATE';
                }
        }
  }
  
 -class_alias( 'Database', 'DatabaseBase' );
 +class_alias( Database::class, 'DatabaseBase' );
@@@ -985,7 -985,7 +985,7 @@@ __INDEXATTR__
                                /**
                                 * Prepend our schema (e.g. 'mediawiki') in front
                                 * of the search path
-                                * Fixes bug 15816
+                                * Fixes T17816
                                 */
                                $search_path = $this->getSearchPath();
                                array_unshift( $search_path,
                                // Normal client
                                $this->numericVersion = $versionInfo['server'];
                        } else {
-                               // Bug 16937: broken pgsql extension from PHP<5.3
+                               // T18937: broken pgsql extension from PHP<5.3
                                $this->numericVersion = pg_parameter_status( $conn, 'server_version' );
                        }
                }
                $q = <<<SQL
        SELECT 1 FROM pg_class, pg_namespace, pg_trigger
                WHERE relnamespace=pg_namespace.oid AND relkind='r'
 -                        AND tgrelid=pg_class.oid
 -                        AND nspname=%s AND relname=%s AND tgname=%s
 +                      AND tgrelid=pg_class.oid
 +                      AND nspname=%s AND relname=%s AND tgname=%s
  SQL;
                $res = $this->query(
                        sprintf(
  
                $preLimitTail .= $this->makeOrderBy( $options );
  
 -              // if ( isset( $options['LIMIT'] ) ) {
 -              //      $tailOpts .= $this->limitResult( '', $options['LIMIT'],
 -              //              isset( $options['OFFSET'] ) ? $options['OFFSET']
 -              //              : false );
 -              // }
 -
                if ( isset( $options['FOR UPDATE'] ) ) {
                        $postLimitTail .= ' FOR UPDATE OF ' .
                                implode( ', ', array_map( [ $this, 'tableName' ], $options['FOR UPDATE'] ) );
@@@ -31,6 -31,7 +31,6 @@@ use WANObjectCache
  use Exception;
  use RuntimeException;
  use IDatabase;
 -use LoadBalancer;
  use DBTransactionError;
  use DBReplicationWaitError;
  
@@@ -336,7 -337,7 +336,7 @@@ abstract class LBFactory implements ILB
                $masterPositions = array_fill( 0, count( $lbs ), false );
                foreach ( $lbs as $i => $lb ) {
                        if ( $lb->getServerCount() <= 1 ) {
-                               // Bug 27975 - Don't try to wait for replica DBs if there are none
+                               // T29975 - Don't try to wait for replica DBs if there are none
                                // Prevents permission error when getting master position
                                continue;
                        } elseif ( $opts['ifWritesSince']