RR级别:
1 5 10 13 15
select * from xx where a<=10 for update
对于a 是唯一索引,会对下一条记录15加 NEX_KEY _lock 锁 , (13,15] 右闭区间 (有删除标记,PURGE)
select * from xx where a=10 for update
对于非唯一索引,会对下一条记录 加CAP锁 (13,15) 右 开区间