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
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