Debian Codegraph @

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

raw
1 include/master-slave.inc
2 Warnings:
3 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
4 Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
5 [connection master]
6 CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;
7 INSERT INTO t1 VALUES (0);
8
9 # On connection master
10 START TRANSACTION;
11 UPDATE t1 SET c1=1 WHERE c1=0;
12
13 # On connection con1
14 include/start_transaction_high_prio.inc
15 START TRANSACTION /* HIGH PRIORITY */;
16 UPDATE t1 SET c1=2 WHERE c1=0;
17 COMMIT;
18
19 # On connection master
20 COMMIT;
21 ERROR HY000: Got error 149 - 'Lock deadlock; Retry transaction' during COMMIT
22 # Row with value 2 is expected on master.
23 SELECT * FROM t1;
24 c1
25 2
26 include/sync_slave_sql_with_master.inc
27 # Row with value 2 is expected on slave.
28 SELECT * FROM t1;
29 c1
30 2
31 #
32 # Bug#23021168 REPLICATION STOPS AFTER TRANSACTION IS ROLLED BACK
33 # ASYNCHRONOUSLY IN MASTER
34 #
35
36 # On connection master
37 START TRANSACTION;
38 INSERT INTO t1 VALUES (1);
39
40 # On connection con1
41 include/start_transaction_high_prio.inc
42 START TRANSACTION /* HIGH PRIORITY */;
43 INSERT INTO t1 VALUES (1);
44 COMMIT;
45 SELECT * FROM t1 ORDER BY c1;
46 c1
47 1
48 2
49
50 # On connection master
51 INSERT INTO t1 VALUES (3);
52 ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
53 INSERT INTO t1 VALUES (4);
54 COMMIT;
55 include/sync_slave_sql_with_master.inc
56 # Rows 1, 2, 3 & 4 is expected on slave.
57 SELECT * FROM t1 ORDER BY c1;
58 c1
59 1
60 2
61 4
62
63 # On connection master
64 DROP TABLE t1;
65 include/sync_slave_sql_with_master.inc
66 include/rpl_end.inc