Add some __METHOD__ to begin/commit/rollback calls
Change-Id: I20dad8d6bb7a523e8a6f50bc0af5cdba57d7160f
This commit is contained in:
parent
0dea0a664d
commit
7cc01d56b2
8 changed files with 14 additions and 14 deletions
|
|
@ -1736,7 +1736,7 @@ class WikiPage extends Page implements IDBAccessObject {
|
|||
$status->merge( $prepStatus );
|
||||
|
||||
if ( !$status->isOK() ) {
|
||||
$dbw->rollback();
|
||||
$dbw->rollback( __METHOD__ );
|
||||
|
||||
wfProfileOut( __METHOD__ );
|
||||
return $status;
|
||||
|
|
@ -1815,7 +1815,7 @@ class WikiPage extends Page implements IDBAccessObject {
|
|||
$status->merge( $prepStatus );
|
||||
|
||||
if ( !$status->isOK() ) {
|
||||
$dbw->rollback();
|
||||
$dbw->rollback( __METHOD__ );
|
||||
|
||||
wfProfileOut( __METHOD__ );
|
||||
return $status;
|
||||
|
|
|
|||
|
|
@ -1213,13 +1213,13 @@ class LocalFile extends File {
|
|||
$status = $wikiPage->doEditContent( $content, $comment, EDIT_NEW | EDIT_SUPPRESS_RC, false, $user );
|
||||
|
||||
if ( isset( $status->value['revision'] ) ) { // XXX; doEdit() uses a transaction
|
||||
$dbw->begin();
|
||||
$dbw->begin( __METHOD__ );
|
||||
$dbw->update( 'logging',
|
||||
array( 'log_page' => $status->value['revision']->getPage() ),
|
||||
array( 'log_id' => $logId ),
|
||||
__METHOD__
|
||||
);
|
||||
$dbw->commit(); // commit before anything bad can happen
|
||||
$dbw->commit( __METHOD__ ); // commit before anything bad can happen
|
||||
}
|
||||
}
|
||||
wfProfileOut( __METHOD__ . '-edit' );
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ class JobQueueDB extends JobQueue {
|
|||
|
||||
$autoTrx = $dbw->getFlag( DBO_TRX ); // automatic begin() enabled?
|
||||
if ( $atomic ) {
|
||||
$dbw->begin(); // wrap all the job additions in one transaction
|
||||
$dbw->begin( __METHOD__ ); // wrap all the job additions in one transaction
|
||||
} else {
|
||||
$dbw->clearFlag( DBO_TRX ); // make each query its own transaction
|
||||
}
|
||||
|
|
@ -87,14 +87,14 @@ class JobQueueDB extends JobQueue {
|
|||
}
|
||||
} catch ( DBError $e ) {
|
||||
if ( $atomic ) {
|
||||
$dbw->rollback();
|
||||
$dbw->rollback( __METHOD__ );
|
||||
} else {
|
||||
$dbw->setFlag( $autoTrx ? DBO_TRX : 0 ); // restore automatic begin()
|
||||
}
|
||||
throw $e;
|
||||
}
|
||||
if ( $atomic ) {
|
||||
$dbw->commit();
|
||||
$dbw->commit( __METHOD__ );
|
||||
} else {
|
||||
$dbw->setFlag( $autoTrx ? DBO_TRX : 0 ); // restore automatic begin()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -212,7 +212,7 @@ class UploadFromChunks extends UploadFromFile {
|
|||
$dbw = $this->repo->getMasterDb();
|
||||
// Use a quick transaction since we will upload the full temp file into shared
|
||||
// storage, which takes time for large files. We don't want to hold locks then.
|
||||
$dbw->begin();
|
||||
$dbw->begin( __METHOD__ );
|
||||
$dbw->update(
|
||||
'uploadstash',
|
||||
array(
|
||||
|
|
@ -223,7 +223,7 @@ class UploadFromChunks extends UploadFromFile {
|
|||
array( 'us_key' => $this->mFileKey ),
|
||||
__METHOD__
|
||||
);
|
||||
$dbw->commit();
|
||||
$dbw->commit( __METHOD__ );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class CleanupPreferences extends Maintenance {
|
|||
global $wgHiddenPrefs;
|
||||
|
||||
$dbw = wfGetDB( DB_MASTER );
|
||||
$dbw->begin();
|
||||
$dbw->begin( __METHOD__ );
|
||||
foreach( $wgHiddenPrefs as $item ) {
|
||||
$dbw->delete(
|
||||
'user_properties',
|
||||
|
|
@ -43,7 +43,7 @@ class CleanupPreferences extends Maintenance {
|
|||
__METHOD__
|
||||
);
|
||||
};
|
||||
$dbw->commit();
|
||||
$dbw->commit( __METHOD__ );
|
||||
$this->output( "Finished!\n" );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ class ConvertUserOptions extends Maintenance {
|
|||
array( 'LIMIT' => 50, 'FOR UPDATE' )
|
||||
);
|
||||
$id = $this->convertOptionBatch( $res, $dbw );
|
||||
$dbw->commit();
|
||||
$dbw->commit( __METHOD__ );
|
||||
|
||||
wfWaitForSlaves();
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ class DeleteOrphanedRevisions extends Maintenance {
|
|||
|
||||
# Nothing to do?
|
||||
if ( $report || $count == 0 ) {
|
||||
$dbw->commit();
|
||||
$dbw->commit( __METHOD__ );
|
||||
exit( 0 );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -275,7 +275,7 @@ class DbTestRecorder extends DbTestPreviewer {
|
|||
* and all that fun stuff
|
||||
*/
|
||||
function start() {
|
||||
$this->db->begin();
|
||||
$this->db->begin( __METHOD__ );
|
||||
|
||||
if ( ! $this->db->tableExists( 'testrun' )
|
||||
|| ! $this->db->tableExists( 'testitem' ) )
|
||||
|
|
|
|||
Loading…
Reference in a new issue