Fixed Forcing certain tables to InnoDB

digitalpoint

Well-known member
Affected version
2.3
Did an update to 2.3, and ended up with "unexpected errors" on all pages... looked in xf_error_log manually and it was because certain important tables didn't exist (for example xf_session_activity).

More digging and it looks like step14 of 2.3 alpha forces what used to be MEMORY tables to InnoDB.

PHP:
    public function step14(): void
    {
        $tables = [
            'xf_attachment_view',
            'xf_session',
            'xf_session_activity',
            'xf_session_admin',
            'xf_session_install',
            'xf_thread_view',
        ];

        foreach ($tables AS $tableName)
        {
            $this->alterTable($tableName, function (Alter $table)
            {
                $table->engine('InnoDB');
            });
        }
    }

Anyway... long story, short is I use ndbcluster engine for all tables, so if you force a table to InnoDB (or anything else really), that table only is available on the server that it was changed on (InnoDB is a local storage engine).

Not a huge deal because I can go to that server, change those to ndbcluster and the become available on all the servers again... however, it might not be a bad thing to change those tables to InnoDB only if the config doesn't have a specific engine being used. Like this is in my config file, and it works fine for new tables being added:

PHP:
$config['db']['engine'] = 'ndbcluster';
 
Last edited:
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.3.0 Beta 4).

Change log:
Only convert tables to InnoDB if InnoDB is the default storage engine. Log error in this case so it can be picked up after upgrade if needed.
There may be a delay before changes are rolled out to the XenForo Community.
 
Top Bottom