MySQL InnoDB – What Happens to Inserts During Table Alteration?

database-designinnodbMySQL

I am trying to alter a database column by using:

ALTER TABLE [table name] MODIFY id bigint;

I searched and found out that the table gets locked during the ALTER process.

How do the inserts get affected during the ALTER process? Do they wait until the lock is released? Is there a timeout?

If the inserts wait for the lock to be released, is there a limit of how many inserts that could wait?

Best Answer

What version of MySQL are you using?

Have you considered ALGORITHM=inplace and LOCK=none in your ALTER TABLE statement?

See also Using the LOCK clause to control concurrency