dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Handle missing namespace prefix in XML dumps more gracefully"
[lhc/web/wiklou.git]
/
includes
/
libs
/
rdbms
/
database
/
Database.php
diff --git
a/includes/libs/rdbms/database/Database.php
b/includes/libs/rdbms/database/Database.php
index
1c5c77e
..
e807bc8
100644
(file)
--- 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\TransactionProfiler;
use Wikimedia\Rdbms\LikeMatch;
use Wikimedia\Rdbms\DatabaseDomain;
+use Wikimedia\Rdbms\ResultWrapper;
use Wikimedia\Rdbms\DBMasterPos;
use Wikimedia\Rdbms\Blob;
use Wikimedia\Rdbms\DBMasterPos;
use Wikimedia\Rdbms\Blob;
+use Wikimedia\Timestamp\ConvertibleTimestamp;
/**
* Relational database abstraction object
/**
* 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.
}
// 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 42
598)
+ // Or, for one-word queries (like "BEGIN" or COMMIT") add it to the end (
T44
598)
$commentedSql = preg_replace( '/\s|$/', " /* $fname {$this->agent} */ ", $sql, 1 );
# Start implicit transactions that wrap the request if DBO_TRX is enabled
$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;
private function handleSessionLoss() {
$this->mTrxLevel = 0;
- $this->mTrxIdleCallbacks = []; //
bug 65
263
- $this->mTrxPreCommitCallbacks = []; //
bug 65
263
+ $this->mTrxIdleCallbacks = []; //
T67
263
+ $this->mTrxPreCommitCallbacks = []; //
T67
263
$this->mSessionTempTables = [];
$this->mNamedLocksHeld = [];
try {
$this->mSessionTempTables = [];
$this->mNamedLocksHeld = [];
try {
@@
-1141,12
+1143,6
@@
abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware
$preLimitTail .= $this->makeOrderBy( $options );
$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';
}
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(
*/
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()
);
( new RuntimeException() )->getTraceAsString()
);