Removed half-assed $wgDBtransactions global.
authorAaron <aschulz@wikimedia.org>
Tue, 19 Jun 2012 22:01:38 +0000 (15:01 -0700)
committerAaron <aschulz@wikimedia.org>
Wed, 20 Jun 2012 17:37:47 +0000 (10:37 -0700)
Change-Id: I5211ec50622b0a40bf4756b7fe735dc669f928e7

RELEASE-NOTES-1.20
includes/DefaultSettings.php
includes/WikiPage.php

index f3e6c7e..2729aee 100644 (file)
@@ -161,6 +161,10 @@ changes to languages because of Bugzilla reports.
 * Removed ./tests/qunit/index.html from core. It wasn't actively maintained and
   has been made obsolete when [[Special:JavaScriptTest/qunit]] was introduced,
   which actually uses ResourceLoader, LocalSettings and the Skin.
+* Removed $wgDBtransactions global. This was only checked in one class
+  and only applies to MyISAM or similar DBs. Those should only be used
+  for archived sites anyway. We can't get edit conflicts on such sites,
+  so the WikiPage code wasn't useful there either.
 
 == Compatibility ==
 
index c2606ce..6e59a86 100644 (file)
@@ -1381,9 +1381,6 @@ $wgDBClusterTimeout = 10;
  */
 $wgDBAvgStatusPoll = 2000;
 
-/** Set to true if using InnoDB tables */
-$wgDBtransactions = false;
-
 /**
  * Set to true to engage MySQL 4.1/5.0 charset-related features;
  * for now will just cause sending of 'SET NAMES=utf8' on connect.
index 40e0ec3..c203e4f 100644 (file)
@@ -1445,7 +1445,7 @@ class WikiPage extends Page {
         *  Compatibility note: this function previously returned a boolean value indicating success/failure
         */
        public function doEdit( $text, $summary, $flags = 0, $baseRevId = false, $user = null ) {
-               global $wgUser, $wgDBtransactions, $wgUseAutomaticEditSummaries;
+               global $wgUser, $wgUseAutomaticEditSummaries;
 
                # Low-level sanity check
                if ( $this->mTitle->getText() === '' ) {
@@ -1513,11 +1513,6 @@ class WikiPage extends Page {
                                return $status;
                        }
 
-                       # Make sure the revision is either completely inserted or not inserted at all
-                       if ( !$wgDBtransactions ) {
-                               $userAbort = ignore_user_abort( true );
-                       }
-
                        $revision = new Revision( array(
                                'page'       => $this->getId(),
                                'comment'    => $summary,
@@ -1548,11 +1543,6 @@ class WikiPage extends Page {
                                        /* Belated edit conflict! Run away!! */
                                        $status->fatal( 'edit-conflict' );
 
-                                       # Delete the invalid revision if the DB is not transactional
-                                       if ( !$wgDBtransactions ) {
-                                               $dbw->delete( 'revision', array( 'rev_id' => $revisionId ), __METHOD__ );
-                                       }
-
                                        $revisionId = 0;
                                        $dbw->rollback( __METHOD__ );
                                } else {
@@ -1583,10 +1573,6 @@ class WikiPage extends Page {
                                $revision->setId( $this->getLatest() );
                        }
 
-                       if ( !$wgDBtransactions ) {
-                               ignore_user_abort( $userAbort );
-                       }
-
                        // Now that ignore_user_abort is restored, we can respond to fatal errors
                        if ( !$status->isOK() ) {
                                wfProfileOut( __METHOD__ );