patternsqlMinor
What happens to an insert when a mysql(innoDB) table is being altered(locked)?
Viewed 0 times
insertwhatinnodblockedalteredbeingmysqlwhenhappenstable
Problem
I am trying to alter a database column by using:
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?
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?
Solution
What version of MySQL are you using?
Have you considered
See also Using the LOCK clause to control concurrency
Have you considered
ALGORITHM=inplace and LOCK=none in your ALTER TABLE statement?See also Using the LOCK clause to control concurrency
Context
StackExchange Database Administrators Q#176445, answer score: 2
Revisions (0)
No revisions yet.