DDL语句只申请意向级别的表锁。在lock table语句中,mysql会申请mysql级别表锁,同时innodb也会申请innodb级别表锁。前提是innodb_table_locks=1
https://www.percona.com/blog/2012/07/31/innodb-table-locks/
MySQL Table level locks and Innodb Table Levellocks are two separate beings. You almost never will run into problems withInnodb table level locks because innodb will only set intentional level locks for everythingby DDL operations. If you’re having locking issues with Innodbchances are it is row level locks or auto increment table level lock (mostlywith MySQL 5.0 and older MySQL versions). MySQL level locks are entirelydifferent story. Explicitly locking tables on MySQL level will prevent tablesfrom being accessed and will not show up in