From 627ceb7d09933dca6533e1503b5ec4e878de9e1d Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Tue, 1 Nov 2011 06:17:40 +0000 Subject: [PATCH] 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} --- includes/db/DatabaseMysql.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; } -- 2.20.1