From f250335f19719029d78e946014afb5254475c5d9 Mon Sep 17 00:00:00 2001 From: ebernhardson Date: Thu, 25 Apr 2013 14:34:17 -0700 Subject: [PATCH] MyISAM warning when InnoDB is not available Bug: 34430 Change-Id: I68e79a8efe7cd625c12b5993074de9c3479e760b --- includes/installer/Installer.i18n.php | 6 ++++++ includes/installer/MysqlInstaller.php | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/includes/installer/Installer.i18n.php b/includes/installer/Installer.i18n.php index 61886b2455..43fb14e851 100644 --- a/includes/installer/Installer.i18n.php +++ b/includes/installer/Installer.i18n.php @@ -336,6 +336,12 @@ The account you specify here must already exist.', If your MySQL installation supports InnoDB, it is highly recommended that you choose that instead. If your MySQL installation does not support InnoDB, maybe it's time for an upgrade.", + 'config-mysql-only-myisam-dep' => "'''Warning:''' MyISAM is the only available storage engine for MySQL, which is not recommended for use with MediaWiki, because: +* it barely supports concurrency due to table locking +* it is more prone to corruption than other engines +* the MediaWiki codebase does not always handle MyISAM as it should + +Your MySQL installation does not support InnoDB, maybe it's time for an upgrade.", 'config-mysql-engine-help' => "'''InnoDB''' is almost always the best option, since it has good concurrency support. '''MyISAM''' may be faster in single-user or read-only installations. diff --git a/includes/installer/MysqlInstaller.php b/includes/installer/MysqlInstaller.php index d5509096e7..84638d46be 100644 --- a/includes/installer/MysqlInstaller.php +++ b/includes/installer/MysqlInstaller.php @@ -350,7 +350,11 @@ class MysqlInstaller extends DatabaseInstaller { $s .= Xml::openElement( 'div', array( 'id' => 'dbMyisamWarning' )); - $s .= $this->parent->getWarningBox( wfMessage( 'config-mysql-myisam-dep' )->text() ); + $myisamWarning = 'config-mysql-myisam-dep'; + if ( count( $engines ) === 1 ) { + $myisamWarning = 'config-mysql-only-myisam-dep'; + } + $s .= $this->parent->getWarningBox( wfMessage( $myisamWarning )->text() ); $s .= Xml::closeElement( 'div' ); if ( $this->getVar( '_MysqlEngine' ) != 'MyISAM' ) { -- 2.20.1