X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Flibs%2Frdbms%2Fdatabase%2FDatabase.php;h=e807bc84adb6ecb1f0ec06538d75c4bab26f0fa2;hb=22806b0a4509e97b56fb52b387e17e3c80fb7eb2;hp=1c5c77e41c955a1da062f8a8df05b9d1bec14132;hpb=254436a05f15744557a3eee9c502fe40287c634e;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/rdbms/database/Database.php b/includes/libs/rdbms/database/Database.php index 1c5c77e41c..e807bc84ad 100644 --- a/includes/libs/rdbms/database/Database.php +++ b/includes/libs/rdbms/database/Database.php @@ -29,8 +29,10 @@ use Wikimedia\ScopedCallback; use Wikimedia\Rdbms\TransactionProfiler; use Wikimedia\Rdbms\LikeMatch; use Wikimedia\Rdbms\DatabaseDomain; +use Wikimedia\Rdbms\ResultWrapper; use Wikimedia\Rdbms\DBMasterPos; use Wikimedia\Rdbms\Blob; +use Wikimedia\Timestamp\ConvertibleTimestamp; /** * Relational database abstraction object @@ -846,7 +848,7 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware } // 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 @@ -1025,8 +1027,8 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware 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 { @@ -1141,12 +1143,6 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware $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'; } @@ -3416,7 +3412,7 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware */ public function __clone() { $this->connLogger->warning( - "Cloning " . get_class( $this ) . " is not recomended; forking connection:\n" . + "Cloning " . static::class . " is not recomended; forking connection:\n" . ( new RuntimeException() )->getTraceAsString() );