事务 A 的加锁读
product_id = 8
product_id BETWEEN 8 AND 9
id = 3
隔离级别
可重复读
读已提交
事务 B 插入新订单
product_id = 7
product_id = 8
product_id = 9
idx_product_id 的叶子,按 (product_id, id) 排好
主键索引的叶子,按 id 排好
锁住的记录
锁住的空隙
新订单要插进的空隙