r101451 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101450‎ | r101451 | r101452 >
Date:06:17, 1 November 2011
Author:reedy
Status:ok
Tags:
Comment:
Bug 30120 - Interwiki links error after upgrade

Per Emufarmers, in wgDBTableOptions replace TYPE with ENGINE

Should at least stop the errors. Do need to do something in the updaters (can we have some "delayed messages" or something?

Needed more for the CLI updater/update.php, as putting it in the middle of the updaters is just pointless, as it won't be seen. Needs to be at the end...

Doing it in the webupdater is saner/easier, as it'll be displayed

Certainly, this does suffice for the moment

Fine on MySQL 4, as it accepts {TYPE|ENGINE}
Modified paths:
  • /trunk/phase3/includes/db/DatabaseMysql.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/db/DatabaseMysql.php
@@ -793,9 +793,12 @@
794794 return $this->query( "DROP TABLE IF EXISTS " . $this->tableName( $tableName ), $fName );
795795 }
796796
 797+ /**
 798+ * @return array
 799+ */
797800 protected function getDefaultSchemaVars() {
798801 $vars = parent::getDefaultSchemaVars();
799 - $vars['wgDBTableOptions'] = $GLOBALS['wgDBTableOptions'];
 802+ $vars['wgDBTableOptions'] = str_replace( 'TYPE', 'ENGINE', $GLOBALS['wgDBTableOptions'] );
800803 return $vars;
801804 }
802805

Follow-up revisions

RevisionCommit summaryAuthorDate
r101899MFT r101451reedy22:36, 3 November 2011

Status & tagging log