22 Matching Annotations
  1. Aug 2022
    1. insert … on duplicate语句,确保了在事务内部,执行了这个SQL语句后,就强行占住了这个行锁

      这样update这行,在当前事务commit之后(即释放行锁),其他事务才能update这行