数据准备 为了观察死锁发送具体过程,关闭死锁检测 set global innodb_deadlock_detect='OFF'; 表准备: CREATE TABLE t1( id int NOT NULL AUTO_INCREMENT, a int NOT NULL, PRIMARY KEY (id), UNIQUE KEY (a) ) ENGINE=InnoDB ; 数据准备 insert i
背景 业务端遇到报错为"Deadlock found when trying to get lock; try restarting transaction"则表明有死锁发生 名称 配置 数据库版本 GreatSQL 8.0.26 隔离级别 Read-Commited innodb status 日志 greatsql> show engine innodb status\G *******