Pass __METHOD__ to DatabaseBase::commit() and DatabaseBase::rollback()
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Tue, 28 Feb 2012 18:41:36 +0000 (18:41 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Tue, 28 Feb 2012 18:41:36 +0000 (18:41 +0000)
maintenance/cleanupImages.php
maintenance/deleteSelfExternals.php
maintenance/fixSlaveDesync.php
maintenance/nukePage.php
maintenance/updateSpecialPages.php

index 581ff2d..6a6a446 100644 (file)
@@ -173,7 +173,7 @@ class ImageCleanup extends TableCleanup {
                        if ( !file_exists( $dir ) ) {
                                if ( !wfMkdirParents( $dir, null, __METHOD__ ) ) {
                                        $this->output( "RENAME FAILED, COULD NOT CREATE $dir" );
-                                       $db->rollback();
+                                       $db->rollback( __METHOD__ );
                                        return;
                                }
                        }
index 4e9f54f..447d3bd 100644 (file)
@@ -40,7 +40,7 @@ class DeleteSelfExternals extends Maintenance {
                $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" );
index a37fd80..7731d3e 100644 (file)
@@ -98,7 +98,7 @@ class FixSlaveDesync extends Maintenance {
                        /*
                        if ( !$db->masterPosWait( $masterFile, $masterPos, 10 ) ) {
                                   $this->output( "Slave is too lagged, aborting\n" );
-                                  $dbw->commit();
+                                  $dbw->commit( __METHOD__ );
                                   sleep(10);
                                   return;
                        }*/
index 5031b58..f63de43 100644 (file)
@@ -73,7 +73,7 @@ class NukePage extends Maintenance {
                                $this->output( "done.\n" );
                        }
 
-                       $dbw->commit();
+                       $dbw->commit( __METHOD__ );
 
                        # Delete revisions as appropriate
                        if ( $delete && $count ) {
index ddf1601..a1a2e2f 100644 (file)
@@ -128,7 +128,7 @@ class UpdateSpecialPages extends Maintenance {
                                                $this->output( "Reconnected\n\n" );
                                        } else {
                                                # Commit the results
-                                               $dbw->commit();
+                                               $dbw->commit( __METHOD__ );
                                        }
                                        # Wait for the slave to catch up
                                        wfWaitForSlaves();