Mysql innodb常见死锁总结 Posted on 2018-08-24 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 14.5 InnoDB Locking and Transaction Model MySQL 加锁处理分析