#2796 - Deprecate MyISAM; use INNODB (on hold)
| Identifier | #2796 |
|---|---|
| Issue type | Feature request or suggestion |
| Title | Deprecate MyISAM; use INNODB (on hold) |
| Status | Open |
| Tags |
Risk: Database change (custom) Risk: Deprecates functionality (custom) Roadmap: Over the horizon (custom) Roadmap: v11 partial implementation (custom) |
| Handling member | Deleted |
| Addon | core_database_drivers |
| Description | Currently, Composr uses the MyISAM database engine for MySQL installations. MyISAM is no longer maintained and probably should not be used.
Instead, Composr should use the INNODB engine as it has active development and has some performance improvements over MyISAM (for large sites). |
| Steps to reproduce | |
| Additional information | Switching to INNODB means Composr's minimum MySQL version will need to be bumped up to 5.6 or higher. INNODB does not support full text searching prior to MySQL 5.6 . |
| Related to | #2356 - Support referential integrity via foreign key constraints |
| Funded? | No |
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".


Comments
I'd do the switch today though, if we could rely on MySQL 5.6 being on web hosts. As it stands we're already pushing things with our requirement for MySQL 5.5.3.
And when innodb corrupts, you have a VERY valid point there. I have never been able to recover a corrupted InnoDB database before.
I don't want us to officially support both as supporting just one right now allows us to give better advice. For example, one of the tutorials references the [tt]myisamchk[/tt] tool to repair tables.
Also I've recently seen actually bugginess on InnoDB, https://bugs.mysql.com/bug.php?id=81031 happened to a customer recently.
- MySQL is not supported below 8.0 anymore so we can be almost certain everyone has at least 5.7
- InnoDB has more benefits than drawbacks compared to MyISAM (especially now that v11 is much more aggressive with stats)
- Another benefit not mentioned is InnoDB supports foreign keys and constraints, so it can act as a secondary safeguard for data integrity, or at least a way to auto-prune orphaned records
Shouldn't be too difficult; it's already partially implemented.
- Migrate meta-toolkit code into core
- Create new table... db_meta_relations, to replace get_relation_map function
- Add new DB driver functions create_foreign_key / edit_foreign_key / delete_foreign_key. These will always modify db_meta_relations, but they will only apply the foreign key if the driver supports it (in our case, if using MySQL and InnoDB).
- Add the ability to migrate an existing MyISAM database to InnoDB by creating new tables and migrating the data (if at all possible. If not, have clear documentation on how to do it).
- In the DB integrity scan, ensure foreign keys are set correctly according to db_meta_relations. Add a test for this as well.
- Use db_meta_relations instead of get_relation_map / get_relation_map_by_table
- Add InnoDB as an option on the installer... selected by default now (except when running in dev mode, in that case it will randomise between MyISAM and InnoDB)
- Deprecate MyISAM support, plan for removal in v12