Debian Codegraph @

mysql-test/suite/innodb/r/high_prio_trx_2.result

raw
1 CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;
2 INSERT INTO t1 VALUES (0);
3
4 # On connection 1
5 START TRANSACTION;
6 SELECT * FROM t1 WHERE c1=0 FOR UPDATE;
7 c1
8 0
9
10 # On connection 2
11 include/start_transaction_high_prio.inc
12 START TRANSACTION /* HIGH PRIORITY */;
13 UPDATE t1 SET c1=2 WHERE c1=0;
14 COMMIT;
15
16 # On connection 1
17 UPDATE t1 SET c1=1 WHERE c1=0;
18 ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
19 include/assert.inc ['There is a 2 in t1']
20 include/assert.inc ['There is no 1 in t1']
21 include/assert.inc ['There is no 0 in t1']
22 DROP TABLE t1;