Bug #84069 | Improve ALTER TABLE documentation to reflect Online DDL | ||
---|---|---|---|
Submitted: | 6 Dec 2016 5:31 | Modified: | 8 Feb 2017 16:29 |
Reporter: | monty solomon | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Documentation | Severity: | S3 (Non-critical) |
Version: | 5.6, 5.7 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[6 Dec 2016 5:31]
monty solomon
[6 Dec 2016 5:40]
monty solomon
The ALTER documentation states The exception referred to earlier is that ALTER TABLE blocks reads (not just writes) at the point where it is ready to install a new version of the table .frm file, discard the old file, and clear outdated table structures from the table and table definition caches. At this point, it must acquire an exclusive lock. To do so, it waits for current readers to finish, and blocks new reads (and writes). Does that apply to Online DDL? The Online DDL documentation is vague about what happens during the exclusive access. http://dev.mysql.com/doc/refman/5.7/en/innodb-create-index-concurrency.html Depending on the internal workings of the online DDL operation and the LOCK clause of the ALTER TABLE statement, an online DDL operation may wait for currently executing transactions that are accessing the table to commit or roll back before completing because exclusive access to the table is required for a brief time during the initial and final phases of the DDL operation Because there is some processing work involved with recording the changes made by concurrent DML operations, then applying those changes at the end
[6 Dec 2016 11:12]
MySQL Verification Team
Thank you for the bug report.
[8 Feb 2017 16:29]
Daniel Price
Posted by developer: ALTER TABLE documentation has been revised to clarify that the description of the ALTER TABLE copy method applies to operations that are not performed in place. Surrounding content was reorganized. Links to relevant online DDL content were added. https://dev.mysql.com/doc/refman/5.7/en/alter-table.html#alter-table-performance The changes should appear online soon. Thank you for the bug report.