SMF
SMF copied to clipboard
problems from hard-coded storage engines
Basic Information
I recently moved to a new web host (Digital Ocean, with a managed MySQL database) that only allows the InnoDB storage engine. This broke the forum search function, which creates temporary tables with the Memory storage engine. I had to edit Sources/Search.php to change those to InnoDB.
Similarly, when I upgraded the forum from version 2.0.19 to 2.1.4, the upgrade*.sql scripts tried creating several new tables with the MyISAM engine. I had to edit these scripts before I could complete the upgrade.
I saw an earlier ticket (https://github.com/SimpleMachines/SMF/issues/772) about adjusting automatically to use whatever storage engines are available, and it was marked as completed, but apparently that didn't remove all the instances of hard-coded storage engines, or new instances were added since then.
Steps to reproduce
- Install the forum on a database server with no Memory or MyISAM support. 2a. Try using the forum search function. 2b. Try running the upgrade script.
Expected result
SMF should adapt to the available storage engines.
Actual result
Search function fails with the error "Database Error: Storage engine MEMORY is disabled (Table creation is disallowed)."
Upgrade is impossible without manually editing the upgrade scripts. (I didn't save the error messages.)
Version/Git revision
2.1.4
Database Engine
MySQL
Database Version
8.0.30
PHP Version
8.0.30 (yes, the same as the MySQL version!)
Logs
No response
Additional Information
When I moved the forum to the new host, I used Sequel Ace to export the database from the old server and import onto the new server. That must have changed the storage engines automatically, because they were MyISAM on the old server and are InnoDB on the new server and I didn't have to intervene with that.
I used rsync to copy the files from the old server to the new server and ran it like that for about a week before upgrading to version 2.1. I'm guessing the search function didn't work before upgrading, but am not sure; I cleared the error log when upgrading because it had grown to 1.6 GB during that week due to various PHP issues from a newer PHP version.