1 -- connect (con1,localhost,root,,)
2 -- connect (con2,localhost,root,,)
6 SELECT * FROM t1 FOR UPDATE;
7 --
if ($con1_extra_sql_present) {
8 -- eval $con1_extra_sql
13 SELECT * FROM t2 FOR UPDATE;
14 --
if ($con2_extra_sql_present) {
15 -- eval $con2_extra_sql
18 --
if ($con1_should_be_rolledback) {
21 INSERT INTO t2 VALUES (0);
24 INSERT INTO t1 VALUES (0);
28 -- error ER_LOCK_DEADLOCK
32 --
if (!$con1_should_be_rolledback) {
35 INSERT INTO t1 VALUES (0);
38 INSERT INTO t2 VALUES (0);
42 -- error ER_LOCK_DEADLOCK
48 DELETE FROM t5_nontrans;