From fdedd2958a563e7bbcf121a4884bd4683eb203bd Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Sun, 21 Sep 2008 07:56:09 +0000 Subject: [PATCH] Revert r40752. Causes lock contention on site_stats and other tracking tables, probably also causes bug 15656. See wikitech-l. --- includes/Article.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index 9c382f663f..7b41a0876d 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -1475,9 +1475,8 @@ class Article { $lastRevision = 0; $revisionId = 0; - $dbw->begin(); - $changed = ( strcmp( $text, $oldtext ) != 0 ); + if ( $changed ) { $this->mGoodAdjustment = (int)$this->isCountable( $text ) - (int)$this->isCountable( $oldtext ); @@ -1503,6 +1502,7 @@ class Article { 'user_text' => $user->getName(), ) ); + $dbw->begin(); $revisionId = $revision->insertOn( $dbw ); # Update page @@ -1527,6 +1527,7 @@ class Article { } } $user->incEditCount(); + $dbw->commit(); } } else { $revision = null; @@ -1547,7 +1548,6 @@ class Article { Article::onArticleEdit( $this->mTitle, false ); // leave templatelinks for editUpdates() # Update links tables, site stats, etc. $this->editUpdates( $text, $summary, $isminor, $now, $revisionId, $changed ); - $dbw->commit(); } } else { # Create new article -- 2.20.1