今天造成了mysql5.7的死锁,现反思如下:

原因:

在同一个事务中insert后update

解决:

  1. select * from information_schema.innodb_trx;
  2. show processlist;