MySQL Forums
Forum List  »  InnoDB

Select blocks Online DDL?
Posted by: yi yuan
Date: June 25, 2017 09:34PM

Hi guys,
I am using innodb_version | 5.7.15
I have two transactions
the 1st with set autocommit=0 to select data from test table.
the 2nd ALTER TABLE testtable ADD COLUMN TESTSam varchar(20) , algorithm=INPLACE,LOCK=EXCLUSIVE;
I checked metadata lock, the 1st select holds a shared read lock blocks the 2nd one to have exclusive lock to make changes on the table.
ref:https://dev.mysql.com/doc/refman/5.7/en/innodb-create-index-overview.html
Is there any way to avoid that?
thanks
Sam

Options: ReplyQuote


Subject
Views
Written By
Posted
Select blocks Online DDL?
803
June 25, 2017 09:34PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.