Mysql innodb常见死锁总结

InnoDB锁

InnoDB事物

死锁举例

12345678910111213141516171819202122232425262728293031323334353637383940414243

-- 第一种 start transaction ; # 4 UPDATE tx_order SET order_status = '12', after_sale_status = '0', promotion_total_amount = '0.00', payable_amount = '2000.00', refunded_amount = '2000.00', paid_amount = '2000.00', last_update_date = now( ) WHERE id = 784339 ; # 1 update tx_order.tx_order set last_update_date=now() where id = 784330; COMMIT; start transaction ; # 2 UPDATE tx_order SET order_status = '12', after_sale_status = '0', promotion_total_amount = '0.00', payable_amount = '2000.00', refunded_amount = '2000.00', paid_amount = '2000.00', last_update_date = now( ) WHERE id = 784339 ; # 3 update tx_order.tx_order set last_update_date=now() where id = 784330; COMMIT;

reference

本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。

发表于

我来说两句

0 条评论
登录 后参与评论

扫码关注云+社区

领取腾讯云代金券