Bug 30120 - Interwiki links error after upgrade
authorSam Reed <reedy@users.mediawiki.org>
Tue, 1 Nov 2011 06:17:40 +0000 (06:17 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Tue, 1 Nov 2011 06:17:40 +0000 (06:17 +0000)
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

index c7eada7..8d1a811 100644 (file)
@@ -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;
        }