Opened 9 years ago
Last modified 5 years ago
#35109 new enhancement
Add Online DDL support to dbDelta
Reported by: | pento | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Database | Keywords: | needs-patch needs-unit-tests |
Focuses: | performance | Cc: |
Description
Since MySQL 5.1, a bunch of table level operations can be done in an asynchronous manner.
We can add support for this by adding ALGORITHM=INPLACE
to the ALTER TABLE
query, but the fun part is that this algorithm isn't supported for all types of operations.
So, we have a couple of options:
- Keep an array of what operations can be done online in each MySQL and MariaDB version, which will need to be updated for each new version of MySQL.
- Try all
ALTER
queries with the algorithm flag, then catch any SQL errors and fall back to the old style if needed. This will need careful testing with old versions of MySQL, particularly.
https://dev.mysql.com/doc/refman/5.7/en/innodb-create-index-overview.html
Change History (3)
Note: See
TracTickets for help on using
tickets.
@pento should this be punted, maybe early, to a future release?