From d82ef89249e7062019f6822d08d280eeb814f8bc Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Sun, 10 Jul 2016 07:10:11 -0700 Subject: [PATCH] Unbreak the DB updater by removing transaction from doUpdates() Each update should manage its own transactions, which is necessary when batching is needed. Previously, maintenance updates would try to nest begin() and an exception would halt update.php. Bug: T89363 Change-Id: Iaadf847dcef46654e25f89680072dccd4cb5998e --- includes/installer/DatabaseUpdater.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/includes/installer/DatabaseUpdater.php b/includes/installer/DatabaseUpdater.php index 6a20abc902..e57e170fc2 100644 --- a/includes/installer/DatabaseUpdater.php +++ b/includes/installer/DatabaseUpdater.php @@ -409,7 +409,6 @@ abstract class DatabaseUpdater { public function doUpdates( $what = [ 'core', 'extensions', 'stats' ] ) { global $wgVersion; - $this->db->begin( __METHOD__ ); $what = array_flip( $what ); $this->skipSchema = isset( $what['noschema'] ) || $this->fileHandle !== null; if ( isset( $what['core'] ) ) { @@ -431,8 +430,6 @@ abstract class DatabaseUpdater { $this->writeSchemaUpdateFile(); $this->setAppliedUpdates( "$wgVersion-schema", $this->updatesSkipped ); } - - $this->db->commit( __METHOD__ ); } /** -- 2.20.1