}
// 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' );
/**
* 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'] ) );
use Exception;
use RuntimeException;
use IDatabase;
-use LoadBalancer;
use DBTransactionError;
use DBReplicationWaitError;
$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']