$status->merge( $prepStatus );
if ( !$status->isOK() ) {
- $dbw->rollback();
+ $dbw->rollback( __METHOD__ );
wfProfileOut( __METHOD__ );
return $status;
$status->merge( $prepStatus );
if ( !$status->isOK() ) {
- $dbw->rollback();
+ $dbw->rollback( __METHOD__ );
wfProfileOut( __METHOD__ );
return $status;
$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' );
$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
}
}
} 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()
}
$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(
array( 'us_key' => $this->mFileKey ),
__METHOD__
);
- $dbw->commit();
+ $dbw->commit( __METHOD__ );
}
/**
global $wgHiddenPrefs;
$dbw = wfGetDB( DB_MASTER );
- $dbw->begin();
+ $dbw->begin( __METHOD__ );
foreach( $wgHiddenPrefs as $item ) {
$dbw->delete(
'user_properties',
__METHOD__
);
};
- $dbw->commit();
+ $dbw->commit( __METHOD__ );
$this->output( "Finished!\n" );
}
}
array( 'LIMIT' => 50, 'FOR UPDATE' )
);
$id = $this->convertOptionBatch( $res, $dbw );
- $dbw->commit();
+ $dbw->commit( __METHOD__ );
wfWaitForSlaves();
# Nothing to do?
if ( $report || $count == 0 ) {
- $dbw->commit();
+ $dbw->commit( __METHOD__ );
exit( 0 );
}
* and all that fun stuff
*/
function start() {
- $this->db->begin();
+ $this->db->begin( __METHOD__ );
if ( ! $this->db->tableExists( 'testrun' )
|| ! $this->db->tableExists( 'testitem' ) )