Index: trunk/phase3/CREDITS |
— | — | @@ -148,6 +148,7 @@ |
149 | 149 | * Umherirrender |
150 | 150 | * Ville Stadista |
151 | 151 | * Vitaliy Filippov |
| 152 | +* William Demchick |
152 | 153 | * Yuvaraj Pandian T |
153 | 154 | * Zachary Hauri |
154 | 155 | |
Index: trunk/phase3/includes/installer/Installer.i18n.php |
— | — | @@ -317,6 +317,15 @@ |
318 | 318 | 'config-mysql-engine' => 'Storage engine:', |
319 | 319 | 'config-mysql-innodb' => 'InnoDB', |
320 | 320 | '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 | +", |
321 | 330 | 'config-mysql-engine-help' => "'''InnoDB''' is almost always the best option, since it has good concurrency support. |
322 | 331 | |
323 | 332 | '''MyISAM''' may be faster in single-user or read-only installations. |
Index: trunk/phase3/includes/installer/MysqlInstaller.php |
— | — | @@ -318,13 +318,33 @@ |
319 | 319 | if ( !in_array( $this->getVar( '_MysqlEngine' ), $engines ) ) { |
320 | 320 | $this->setVar( '_MysqlEngine', reset( $engines ) ); |
321 | 321 | } |
| 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 | + |
322 | 335 | if ( count( $engines ) >= 2 ) { |
323 | 336 | $s .= $this->getRadioSet( array( |
324 | 337 | 'var' => '_MysqlEngine', |
325 | 338 | 'label' => 'config-mysql-engine', |
326 | 339 | '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 | + ))); |
329 | 349 | $s .= $this->parent->getHelpBox( 'config-mysql-engine-help' ); |
330 | 350 | } |
331 | 351 | |