From 1c0ecc8e210349b87edad9c00f12355321bbcfe7 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Wed, 24 Sep 2008 18:00:25 +0000 Subject: [PATCH] Self-revert and re-add transactions here. Sacrifices some atomicity for less transaction time. --- includes/Article.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/Article.php b/includes/Article.php index 06e3ecded2..5962d6902b 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -1570,6 +1570,7 @@ class Article { $this->mGoodAdjustment = (int)$this->isCountable( $text ); $this->mTotalAdjustment = 1; + $dbw->begin(); # Add the page record; stake our claim on this title! # This will fail with a database query exception if the article already exists $newid = $this->insertOn( $dbw ); @@ -1601,6 +1602,7 @@ class Article { } } $user->incEditCount(); + $dbw->commit(); # Update links, etc. $this->editUpdates( $text, $summary, $isminor, $now, $revisionId, true ); -- 2.20.1