[wp-trac] [WordPress Trac] #35109: Add Online DDL support to dbDelta

WordPress Trac noreply at wordpress.org
Tue Dec 15 22:24:22 UTC 2015


#35109: Add Online DDL support to dbDelta
-------------------------+------------------------------------------
 Reporter:  pento        |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  4.5
Component:  Database     |    Version:
 Severity:  normal       |   Keywords:  needs-patch needs-unit-tests
  Focuses:  performance  |
-------------------------+------------------------------------------
 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

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35109>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list