From: Aaron Schulz Date: Sun, 10 Jul 2016 14:10:11 +0000 (-0700) Subject: Unbreak the DB updater by removing transaction from doUpdates() X-Git-Tag: 1.31.0-rc.0~6294^2 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=d82ef89249e7062019f6822d08d280eeb814f8bc;p=lhc%2Fweb%2Fwiklou.git 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 --- 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__ ); } /**