示例
行锁-InnoDB
create table rlock(a int(10) unsigned not null auto_increment primary key)engine=InnoDB;
insert into rlock(a) values(1),(2),(3);
insert into rlock select null from rlock;
session1:
session2:
session3:
注意:Id-10的查询状态为updating而不是locked
验证InnoDB引擎中是否有一个请求阻塞
show engine innodb status\G