r112332 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112331‎ | r112332 | r112333 >
Date:17:00, 24 February 2012
Author:reedy
Status:ok
Tags:
Comment:
More __METHOD__ into db related methods
Modified paths:
  • /trunk/phase3/includes/Category.php (modified) (history)
  • /trunk/phase3/includes/FileDeleteForm.php (modified) (history)
  • /trunk/phase3/includes/filerepo/LocalRepo.php (modified) (history)
  • /trunk/phase3/includes/revisiondelete/RevisionDeleteAbstracts.php (modified) (history)
  • /trunk/phase3/maintenance/moveBatch.php (modified) (history)
  • /trunk/phase3/maintenance/storage/compressOld.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/storage/compressOld.php
@@ -293,7 +293,7 @@
294294
295295 $chunk = new ConcatenatedGzipHistoryBlob();
296296 $stubs = array();
297 - $dbw->begin();
 297+ $dbw->begin( __METHOD__ );
298298 $usedChunk = false;
299299 $primaryOldid = $revs[$i]->rev_text_id;
300300
@@ -393,7 +393,7 @@
394394 }
395395 # Done, next
396396 $this->output( "/" );
397 - $dbw->commit();
 397+ $dbw->commit( __METHOD__ );
398398 $i += $thisChunkSize;
399399 wfWaitForSlaves();
400400 }
Index: trunk/phase3/maintenance/moveBatch.php
@@ -92,13 +92,13 @@
9393
9494
9595 $this->output( $source->getPrefixedText() . ' --> ' . $dest->getPrefixedText() );
96 - $dbw->begin();
 96+ $dbw->begin( __METHOD__ );
9797 $err = $source->moveTo( $dest, false, $reason );
9898 if ( $err !== true ) {
9999 $msg = array_shift( $err[0] );
100100 $this->output( "\nFAILED: " . wfMsg( $msg, $err[0] ) );
101101 }
102 - $dbw->commit();
 102+ $dbw->commit( __METHOD__ );
103103 $this->output( "\n" );
104104
105105 if ( $interval ) {
Index: trunk/phase3/includes/filerepo/LocalRepo.php
@@ -64,7 +64,7 @@
6565 foreach ( $storageKeys as $key ) {
6666 $hashPath = $this->getDeletedHashPath( $key );
6767 $path = "$root/$hashPath$key";
68 - $dbw->begin();
 68+ $dbw->begin( __METHOD__ );
6969 // Check for usage in deleted/hidden files and pre-emptively
7070 // lock the key to avoid any future use until we are finished.
7171 $deleted = $this->deletedFileHasKey( $key, 'lock' );
@@ -80,7 +80,7 @@
8181 wfDebug( __METHOD__ . ": $key still in use\n" );
8282 $status->successCount++;
8383 }
84 - $dbw->commit();
 84+ $dbw->commit( __METHOD__ );
8585 }
8686 return $status;
8787 }
Index: trunk/phase3/includes/revisiondelete/RevisionDeleteAbstracts.php
@@ -38,7 +38,7 @@
3939 $this->res = false;
4040 $dbw = wfGetDB( DB_MASTER );
4141 $this->doQuery( $dbw );
42 - $dbw->begin();
 42+ $dbw->begin( __METHOD__ );
4343 $status = Status::newGood();
4444 $missing = array_flip( $this->ids );
4545 $this->clearFileOps();
@@ -137,7 +137,7 @@
138138 'authorIds' => $authorIds,
139139 'authorIPs' => $authorIPs
140140 ) );
141 - $dbw->commit();
 141+ $dbw->commit( __METHOD__ );
142142
143143 // Clear caches
144144 $status->merge( $this->doPostCommitUpdates() );
Index: trunk/phase3/includes/FileDeleteForm.php
@@ -154,14 +154,14 @@
155155 if ( $page->doDeleteArticleReal( $reason, $suppress, 0, false, $error, $user ) >= WikiPage::DELETE_SUCCESS ) {
156156 $status = $file->delete( $reason, $suppress );
157157 if( $status->isOK() ) {
158 - $dbw->commit();
 158+ $dbw->commit( __METHOD__ );
159159 } else {
160 - $dbw->rollback();
 160+ $dbw->rollback( __METHOD__ );
161161 }
162162 }
163163 } catch ( MWException $e ) {
164164 // rollback before returning to prevent UI from displaying incorrect "View or restore N deleted edits?"
165 - $dbw->rollback();
 165+ $dbw->rollback( __METHOD__ );
166166 throw $e;
167167 }
168168 }
Index: trunk/phase3/includes/Category.php
@@ -260,7 +260,7 @@
261261 }
262262
263263 $dbw = wfGetDB( DB_MASTER );
264 - $dbw->begin();
 264+ $dbw->begin( __METHOD__ );
265265
266266 # Insert the row if it doesn't exist yet (e.g., this is being run via
267267 # update.php from a pre-1.16 schema). TODO: This will cause lots and
@@ -300,7 +300,7 @@
301301 array( 'cat_title' => $this->mName ),
302302 __METHOD__
303303 );
304 - $dbw->commit();
 304+ $dbw->commit( __METHOD__ );
305305
306306 # Now we should update our local counts.
307307 $this->mPages = $result->pages;

Status & tagging log