r40752 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r40751‎ | r40752 | r40753 >
Date:15:03, 12 September 2008
Author:aaron
Status:old
Tags:
Comment:
Tweak transaction for bug 13039
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -1466,8 +1466,9 @@
14671467 $lastRevision = 0;
14681468 $revisionId = 0;
14691469
 1470+ $dbw->begin();
 1471+
14701472 $changed = ( strcmp( $text, $oldtext ) != 0 );
1471 -
14721473 if ( $changed ) {
14731474 $this->mGoodAdjustment = (int)$this->isCountable( $text )
14741475 - (int)$this->isCountable( $oldtext );
@@ -1493,7 +1494,6 @@
14941495 'user_text' => $user->getName(),
14951496 ) );
14961497
1497 - $dbw->begin();
14981498 $revisionId = $revision->insertOn( $dbw );
14991499
15001500 # Update page
@@ -1519,7 +1519,6 @@
15201520 }
15211521 }
15221522 $user->incEditCount();
1523 - $dbw->commit();
15241523 }
15251524 } else {
15261525 $revision = null;
@@ -1541,6 +1540,7 @@
15421541
15431542 # Update links tables, site stats, etc.
15441543 $this->editUpdates( $text, $summary, $isminor, $now, $revisionId, $changed );
 1544+ $dbw->commit();
15451545 }
15461546 } else {
15471547 # Create new article

Follow-up revisions

RevisionCommit summaryAuthorDate
r41089Revert r40752. Causes lock contention on site_stats and other tracking tables...tstarling07:56, 21 September 2008

Status & tagging log