1.search <= insert_rec, 定位到该记录rec
2.查看rec->next_record 是否有锁
3.判断是否有UK健,有UK的话,
if(rec-->next==insert_rec) //不会报唯一性错误,因为事务没提交,可以回滚
wait: 对 rec-->next 加 s lock 判断唯一性,实现唯一约束 ,大多数情况加S_LOCK而不加 X_LOCK, [没有插入记录] 此时无 [对 rec->record 插入意向锁等待]
else
next 4步
4.无锁,则插入
5.有锁则等待 [ next_key _lock|cap] 些时有 [对 rec->record 插入意向锁等待]
对事务已经插入记录加 X-LOCK