r88475 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r88474‎ | r88475 | r88476 >
Date:18:26, 20 May 2011
Author:mah
Status:resolved (Comments)
Tags:
Comment:
Patch for Bug #28669, “Scream bloody murder when user chooses MyISAM and InnoDB is available”
From William Demchick
Modified paths:
  • /trunk/phase3/CREDITS (modified) (history)
  • /trunk/phase3/includes/installer/Installer.i18n.php (modified) (history)
  • /trunk/phase3/includes/installer/MysqlInstaller.php (modified) (history)

Diff [purge]

Index: trunk/phase3/CREDITS
@@ -148,6 +148,7 @@
149149 * Umherirrender
150150 * Ville Stadista
151151 * Vitaliy Filippov
 152+* William Demchick
152153 * Yuvaraj Pandian T
153154 * Zachary Hauri
154155
Index: trunk/phase3/includes/installer/Installer.i18n.php
@@ -317,6 +317,15 @@
318318 'config-mysql-engine' => 'Storage engine:',
319319 'config-mysql-innodb' => 'InnoDB',
320320 'config-mysql-myisam' => 'MyISAM',
 321+ 'config-mysql-myisam-dep' => "'''Warning''': You have selected MyISAM. MyISAM is not recommended for use with MediaWiki, because:
 322+* it barely supports concurrency due to table locking
 323+* it is more prone to corruption than other engines
 324+* the MediaWiki codebase does not always handle MyISAM as it should
 325+* probably other reasons...
 326+
 327+If your MySQL installation supports InnoDB, it is highly recommended that you choose that instead.
 328+If your MySQL installation does not support InnoDB, maybe its time for an upgrade.
 329+",
321330 'config-mysql-engine-help' => "'''InnoDB''' is almost always the best option, since it has good concurrency support.
322331
323332 '''MyISAM''' may be faster in single-user or read-only installations.
Index: trunk/phase3/includes/installer/MysqlInstaller.php
@@ -318,13 +318,33 @@
319319 if ( !in_array( $this->getVar( '_MysqlEngine' ), $engines ) ) {
320320 $this->setVar( '_MysqlEngine', reset( $engines ) );
321321 }
 322+
 323+ $s .= Xml::openElement( 'div', array(
 324+ 'id' => 'dbMyisamWarning'
 325+ ));
 326+ $s .= $this->parent->getWarningBox( wfMsg( 'config-mysql-myisam-dep' ) );
 327+ $s .= Xml::closeElement( 'div' );
 328+
 329+ if( $this->getVar( '_MysqlEngine' ) != 'MyISAM' ) {
 330+ $s .= Xml::openElement( 'script', array( 'type' => 'text/javascript' ) );
 331+ $s .= '$(\'#dbMyisamWarning\').hide();';
 332+ $s .= Xml::closeElement( 'script' );
 333+ }
 334+
322335 if ( count( $engines ) >= 2 ) {
323336 $s .= $this->getRadioSet( array(
324337 'var' => '_MysqlEngine',
325338 'label' => 'config-mysql-engine',
326339 'itemLabelPrefix' => 'config-mysql-',
327 - 'values' => $engines
328 - ));
 340+ 'values' => $engines,
 341+ 'itemAttribs' => array(
 342+ 'MyISAM' => array(
 343+ 'class' => 'showHideRadio',
 344+ 'rel' => 'dbMyisamWarning'),
 345+ 'InnoDB' => array(
 346+ 'class' => 'hideShowRadio',
 347+ 'rel' => 'dbMyisamWarning')
 348+ )));
329349 $s .= $this->parent->getHelpBox( 'config-mysql-engine-help' );
330350 }
331351

Follow-up revisions

RevisionCommit summaryAuthorDate
r88481Tweak 'config-mysql-myisam-dep' (added in r88475).siebrand19:31, 20 May 2011
r88484Tweak message from r88475maxsem20:14, 20 May 2011

Comments

#Comment by Hashar (talk | contribs)   20:31, 2 June 2011

AHHHHHHHHHHHHHHHHHHHH AHHHHHH JJJHHHHHHHHHHJJHH THERE IS A SERIAL KILLER IN THE NEIGHBORHOOD!!!!111!!!


(mark: is that a good "screaming" performance?)

Status & tagging log