MyISAM warning when InnoDB is not available
authorebernhardson <ebernhardson@wikimedia.org>
Thu, 25 Apr 2013 21:34:17 +0000 (14:34 -0700)
committerebernhardson <ebernhardson@wikimedia.org>
Thu, 25 Apr 2013 22:13:36 +0000 (15:13 -0700)
Bug: 34430
Change-Id: I68e79a8efe7cd625c12b5993074de9c3479e760b

includes/installer/Installer.i18n.php
includes/installer/MysqlInstaller.php

index 61886b2..43fb14e 100644 (file)
@@ -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.
index d550909..84638d4 100644 (file)
@@ -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' ) {