From cb70fd7cdb7c19eb9bcbc6685a023623fa84b20e Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Fri, 14 Jan 2011 20:43:14 +0000 Subject: [PATCH] * (bug 26733) Wrap initial table creation in transaction --- RELEASE-NOTES | 1 + includes/installer/DatabaseInstaller.php | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index df875578f7..a41ec1effa 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -79,6 +79,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN tab on the mainpage of a wiki. * (bug 10158) Do not mention allowing others to contact you when the feature is disabled ($wgEnableUserEmail=false) +* (bug 26733) Wrap initial table creation in transaction === API changes in 1.18 === * (bug 26339) Throw warning when truncating an overlarge API result diff --git a/includes/installer/DatabaseInstaller.php b/includes/installer/DatabaseInstaller.php index 68b5a7b2e4..51986cac16 100644 --- a/includes/installer/DatabaseInstaller.php +++ b/includes/installer/DatabaseInstaller.php @@ -130,10 +130,15 @@ abstract class DatabaseInstaller { } $this->db->setFlag( DBO_DDLMODE ); // For Oracle's handling of schema files + $this->db->begin( __METHOD__ ); + $error = $this->db->sourceFile( $this->db->getSchema() ); if( $error !== true ) { $this->db->reportQueryError( $error, 0, '', __METHOD__ ); + $this->db->rollback( __METHOD__ ); $status->fatal( 'config-install-tables-failed', $error ); + } else { + $this->db->commit( __METHOD__ ); } return $status; } -- 2.20.1