Debian Codegraph @

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

raw
1 CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;
2 INSERT INTO t1 VALUES (0);
3
4 # On connection con1
5 START TRANSACTION;
6 UPDATE t1 SET c1=1 WHERE c1=0;
7
8 # On connection con2
9 include/start_transaction_high_prio.inc
10 START TRANSACTION /* HIGH PRIORITY */;
11 UPDATE t1 SET c1=2 WHERE c1=0;
12 SET DEBUG='+d,crash_commit_after';
13 COMMIT;
14 ERROR HY000: Lost connection to MySQL server during query
15
16 # On connection default
17 # Value 2 is expected as server crash on high prio txn (crash_commit_after point)
18 SELECT * FROM t1;
19 c1
20 2
21 DROP TABLE t1;
22 # Case : crash before commit on high prio transaction
23 CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;
24 INSERT INTO t1 VALUES (0);
25
26 # On connection con1
27 START TRANSACTION;
28 UPDATE t1 SET c1=1 WHERE c1=0;
29
30 # On connection con2
31 include/start_transaction_high_prio.inc
32 START TRANSACTION /* HIGH PRIORITY */;
33 UPDATE t1 SET c1=2 WHERE c1=0;
34 # Kill and restart
35 # Value 0 is expected as server crash on high prio txn (crash_commit_before point)
36 SELECT * FROM t1;
37 c1
38 0
39 DROP TABLE t1;