connection node_2; connection node_1; connection node_1; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; CREATE TABLE t2 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; SET AUTOCOMMIT=OFF; START TRANSACTION; INSERT INTO t1 VALUES (1); INSERT INTO t2 VALUES (1); connection node_2; INSERT INTO t1 VALUES (1); connection node_3; INSERT INTO t2 VALUES (1); connection node_1; COMMIT; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction connection node_3; DROP TABLE t1; DROP TABLE t2;