3 ms·
Renaming a column in 5.6 as described works with concurrent read and write access: https://dev.mysql.com/doc/refman/5.6/en/innodb-create-index-overview.html htt
by thwarted 12y ago
Renaming a column in 5.6 as described works with concurrent read and write access: https://dev.mysql.com/doc/refman/5.6/en/innodb-create-index-overview.html https://dev.mysql.com/doc/refman/5.6/en/innodb-create-index-...
The only thing about implicit full-table locking in the alter-table docs you linked says:
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).
There are no strategies to work around this using just the database. Even if you were to manually create a new table with the new format, migrate all the data manually, and then manually rename, the final rename operation would require a short-duration lock to perform its work. You could, of course, modify your application code to work with two tables during a manual migration.