Followup r60051, with the rest of the callers and removing a useless subclassing from DatabaseMssql
This commit is contained in:
parent
7644e96549
commit
291efd30f2
11 changed files with 15 additions and 31 deletions
|
|
@ -842,22 +842,6 @@ class DatabaseMssql extends DatabaseBase {
|
|||
return $this->lastErrno() == 1205;
|
||||
}
|
||||
|
||||
/**
|
||||
* Begin a transaction, committing any previously open transaction
|
||||
* @deprecated use begin()
|
||||
*/
|
||||
function immediateBegin( $fname = 'Database::immediateBegin' ) {
|
||||
$this->begin();
|
||||
}
|
||||
|
||||
/**
|
||||
* Commit transaction, if one is open
|
||||
* @deprecated use commit()
|
||||
*/
|
||||
function immediateCommit( $fname = 'Database::immediateCommit' ) {
|
||||
$this->commit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return MW-style timestamp used for MySQL schema
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ class AddWiki extends Maintenance {
|
|||
$blobsFile = popen( $sedCmd, 'r' );
|
||||
$extdb->sourceStream( $blobsFile );
|
||||
pclose( $blobsFile );
|
||||
$extdb->immediateCommit();
|
||||
$extdb->commit();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ class CleanupSpam extends Maintenance {
|
|||
$this->output( "False match\n" );
|
||||
} else {
|
||||
$dbw = wfGetDB( DB_MASTER );
|
||||
$dbw->immediateBegin();
|
||||
$dbw->begin();
|
||||
if ( !$rev ) {
|
||||
// Didn't find a non-spammy revision, blank the page
|
||||
$this->output( "blanking\n" );
|
||||
|
|
@ -123,7 +123,7 @@ class CleanupSpam extends Maintenance {
|
|||
$article = new Article( $title );
|
||||
$article->updateArticle( $rev->getText(), wfMsg( 'spam_reverting', $domain ), false, false );
|
||||
}
|
||||
$dbw->immediateCommit();
|
||||
$dbw->commit();
|
||||
wfDoUpdates();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ class DeleteBatch extends Maintenance {
|
|||
$art = new Article( $page );
|
||||
}
|
||||
$success = $art->doDeleteArticle( $reason );
|
||||
$dbw->immediateCommit();
|
||||
$dbw->commit();
|
||||
if ( $success ) {
|
||||
$this->output( "\n" );
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ class DeleteOrphanedRevisions extends Maintenance {
|
|||
$report = $this->hasOption('report');
|
||||
|
||||
$dbw = wfGetDB( DB_MASTER );
|
||||
$dbw->immediateBegin();
|
||||
$dbw->begin();
|
||||
list( $page, $revision ) = $dbw->tableNamesN( 'page', 'revision' );
|
||||
|
||||
# Find all the orphaned revisions
|
||||
|
|
@ -57,7 +57,7 @@ class DeleteOrphanedRevisions extends Maintenance {
|
|||
|
||||
# Nothing to do?
|
||||
if( $report || $count == 0 ) {
|
||||
$dbw->immediateCommit();
|
||||
$dbw->commit();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
|
@ -67,7 +67,7 @@ class DeleteOrphanedRevisions extends Maintenance {
|
|||
$this->output( "done.\n" );
|
||||
|
||||
# Close the transaction and call the script to purge unused text records
|
||||
$dbw->immediateCommit();
|
||||
$dbw->commit();
|
||||
$this->purgeRedundantText( true );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ class MoveBatch extends Maintenance {
|
|||
if( $err !== true ) {
|
||||
$this->output( "\nFAILED: $err" );
|
||||
}
|
||||
$dbw->immediateCommit();
|
||||
$dbw->commit();
|
||||
$this->output( "\n" );
|
||||
|
||||
if ( $interval ) {
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ class ReassignEdits extends Maintenance {
|
|||
*/
|
||||
private function doReassignEdits( &$from, &$to, $rc = false, $report = false ) {
|
||||
$dbw = wfGetDB( DB_MASTER );
|
||||
$dbw->immediateBegin();
|
||||
$dbw->begin();
|
||||
|
||||
# Count things
|
||||
$this->output( "Checking current edits..." );
|
||||
|
|
@ -113,7 +113,7 @@ class ReassignEdits extends Maintenance {
|
|||
}
|
||||
}
|
||||
|
||||
$dbw->immediateCommit();
|
||||
$dbw->commit();
|
||||
return (int)$total;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ class RefreshLinks extends Maintenance {
|
|||
$parserOutput = $wgParser->parse( $revision->getText(), $wgTitle, $options, true, true, $revision->getId() );
|
||||
$update = new LinksUpdate( $wgTitle, $parserOutput, false );
|
||||
$update->doUpdate();
|
||||
$dbw->immediateCommit();
|
||||
$dbw->commit();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -95,12 +95,12 @@ class RemoveUnusedAccounts extends Maintenance {
|
|||
'image' => 'img', 'oldimage' => 'oi' );
|
||||
$count = 0;
|
||||
|
||||
$dbo->immediateBegin();
|
||||
$dbo->begin();
|
||||
foreach( $checks as $table => $fprefix ) {
|
||||
$conds = array( $fprefix . '_user' => $id );
|
||||
$count += (int)$dbo->selectField( $table, 'COUNT(*)', $conds, __METHOD__ );
|
||||
}
|
||||
$dbo->immediateCommit();
|
||||
$dbo->commit();
|
||||
|
||||
return $count == 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ class RenameWiki extends Maintenance {
|
|||
$extdb->query( "ALTER TABLE {$from}.blobs RENAME TO {$to}.blobs" );
|
||||
$extdb->selectDB( $from );
|
||||
$extdb->sourceFile( $this->getDir() . '/storage/blobs.sql' );
|
||||
$extdb->immediateCommit();
|
||||
$extdb->commit();
|
||||
}
|
||||
}
|
||||
$this->output( "done.\n" );
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ class UpdateSpecialPages extends Maintenance {
|
|||
$this->output( "Reconnected\n\n" );
|
||||
} else {
|
||||
# Commit the results
|
||||
$dbw->immediateCommit();
|
||||
$dbw->commit();
|
||||
}
|
||||
# Wait for the slave to catch up
|
||||
wfWaitForSlaves( 5 );
|
||||
|
|
|
|||
Loading…
Reference in a new issue