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
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'] ) ) {
$this->writeSchemaUpdateFile();
$this->setAppliedUpdates( "$wgVersion-schema", $this->updatesSkipped );
}
-
- $this->db->commit( __METHOD__ );
}
/**