From: Sam Reed Date: Tue, 1 Nov 2011 06:17:40 +0000 (+0000) Subject: Bug 30120 - Interwiki links error after upgrade X-Git-Tag: 1.31.0-rc.0~26793 X-Git-Url: https://git.cyclocoop.org/admin/?a=commitdiff_plain;h=627ceb7d09933dca6533e1503b5ec4e878de9e1d;p=lhc%2Fweb%2Fwiklou.git 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} --- diff --git a/includes/db/DatabaseMysql.php b/includes/db/DatabaseMysql.php index c7eada7796..8d1a8110ac 100644 --- a/includes/db/DatabaseMysql.php +++ b/includes/db/DatabaseMysql.php @@ -793,9 +793,12 @@ class DatabaseMysql extends DatabaseBase { return $this->query( "DROP TABLE IF EXISTS " . $this->tableName( $tableName ), $fName ); } + /** + * @return array + */ protected function getDefaultSchemaVars() { $vars = parent::getDefaultSchemaVars(); - $vars['wgDBTableOptions'] = $GLOBALS['wgDBTableOptions']; + $vars['wgDBTableOptions'] = str_replace( 'TYPE', 'ENGINE', $GLOBALS['wgDBTableOptions'] ); return $vars; }