if ( !file_exists( $dir ) ) {
if ( !wfMkdirParents( $dir, null, __METHOD__ ) ) {
$this->output( "RENAME FAILED, COULD NOT CREATE $dir" );
- $db->rollback();
+ $db->rollback( __METHOD__ );
return;
}
}
$db = wfGetDB( DB_MASTER );
while ( 1 ) {
wfWaitForSlaves();
- $db->commit();
+ $db->commit( __METHOD__ );
$q = $db->limitResult( "DELETE /* deleteSelfExternals */ FROM externallinks WHERE el_to"
. $db->buildLike( $wgServer . '/', $db->anyString() ), $this->mBatchSize );
$this->output( "Deleting a batch\n" );
/*
if ( !$db->masterPosWait( $masterFile, $masterPos, 10 ) ) {
$this->output( "Slave is too lagged, aborting\n" );
- $dbw->commit();
+ $dbw->commit( __METHOD__ );
sleep(10);
return;
}*/
$this->output( "done.\n" );
}
- $dbw->commit();
+ $dbw->commit( __METHOD__ );
# Delete revisions as appropriate
if ( $delete && $count ) {
$this->output( "Reconnected\n\n" );
} else {
# Commit the results
- $dbw->commit();
+ $dbw->commit( __METHOD__ );
}
# Wait for the slave to catch up
wfWaitForSlaves();