- mysql lock - lock mode - share lock , 略S, for read - exclusive lock, 略X,for update or delete。even read have to wait the lock. - lock granularity(粒度) - table lock - row lock(record lock) - A record lock is a lock on an index record. - if no index, innodb will create a hidden cluster index to lock. - show engine innodb status; ``` RECORD LOCKS space id 58 page no 3 n bits 72 index `PRIMARY` of table `test`.`t` trx id 10078 lock_mode X locks rec but not gap Record lock, heap no...