From: Tim Starling Date: Sun, 21 Sep 2008 07:56:09 +0000 (+0000) Subject: Revert r40752. Causes lock contention on site_stats and other tracking tables, probab... X-Git-Tag: 1.31.0-rc.0~45186 X-Git-Url: http://git.cyclocoop.org/data/Luca_Pacioli_%28Gemaelde%29.jpeg?a=commitdiff_plain;h=fdedd2958a563e7bbcf121a4884bd4683eb203bd;p=lhc%2Fweb%2Fwiklou.git Revert r40752. Causes lock contention on site_stats and other tracking tables, probably also causes bug 15656. See wikitech-l. --- 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