WL#5526: InnoDB: Online ADD INDEX

Affects: Server-Prototype Only   —   Status: Complete

Currently, InnoDB supports fast add/drop indexes - create or drop indexes
without copying the contents of the entire table. See 
http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-create-index-overview.html
for details,

This worklog is to track online ADD INDEX and DROP INDEX

Limitations of current implementation in MySQL 5.1 InnoDB Plugin and MySQL 5.5:

• Does not copy history (old versions of records)
 → only transactions that started after CREATE INDEX may use the index
• Does not allow concurrent writes to the table (but allows reads)

This feature will only remove the latter limitation, that is, allow the table to
be modified while secondary index(es) are being created, by creating a temporary
log file. The size of this log file is a multiple of innodb_sort_buf_size, and
it can be limited by a new parameter, innodb_online_alter_log_max_size.

The following limitations will remain for now:

• CREATE PRIMARY KEY and CREATE FULLTEXT INDEX will lock the table (no online
operation)
• ADD COLUMN, and DROP COLUMN require a table copy until WL#5854
• DROP FOREIGN KEY, RENAME INDEX, RENAME COLUMN will be in WL#5545