Debian Codegraph @

mysql-test/suite/galera/r/galera_slave_replay.result

raw
1 connection node_2;
2 connection node_1;
3 connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
4 connection node_2a;
5 ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
6 connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
7 connection node_3;
8 RESET MASTER;
9 connection node_2a;
10 START SLAVE;
11 connection node_3;
12 CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1)) engine=innodb;
13 INSERT INTO t1 VALUES (1, 'a');
14 INSERT INTO t1 VALUES (3, 'a');
15 set binlog_format=STATEMENT;
16 SET AUTOCOMMIT=ON;
17 START TRANSACTION;
18 SELECT * FROM t1 FOR UPDATE;
19 f1 f2
20 1 a
21 3 a
22 UPDATE t1 SET f2 = 'c' WHERE f1 > 1;
23 connection node_2a;
24 SET SESSION wsrep_sync_wait = 0;
25 connection node_1;
26 SET SESSION wsrep_sync_wait = 0;
27 connection node_2a;
28 SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync';
29 SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
30 connection node_1;
31 INSERT INTO test.t1 VALUES (2, 'b');
32 connection node_3;
33 COMMIT;
34 connection node_2a;
35 SET SESSION wsrep_on = 0;
36 SET SESSION wsrep_on = 1;
37 SET GLOBAL debug_dbug = "";
38 SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
39 connection node_2a;
40 SET GLOBAL wsrep_provider_options = 'dbug=';
41 SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync';
42 connection node_3;
43 SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'a';
44 COUNT(*) = 1
45 1
46 SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
47 COUNT(*) = 1
48 1
49 SELECT * FROM t1;
50 f1 f2
51 1 a
52 3 c
53 connection node_2a;
54 set session wsrep_sync_wait=15;
55 set session wsrep_sync_wait=0;
56 wsrep_local_replays
57 1
58 SELECT * FROM t1;
59 f1 f2
60 1 a
61 2 b
62 3 c
63 SET DEBUG_SYNC = "RESET";
64 #
65 # test phase with real abort
66 #
67 connection node_3;
68 set binlog_format=ROW;
69 insert into t1 values (4, 'd');
70 SET AUTOCOMMIT=ON;
71 START TRANSACTION;
72 UPDATE t1 SET f2 = 'd' WHERE f1 = 3;
73 connection node_2a;
74 SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
75 connection node_1;
76 UPDATE test.t1 SET f2 = 'e' WHERE f1 = 3;
77 connection node_2a;
78 SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
79 connection node_3;
80 COMMIT;
81 connection node_2a;
82 SET GLOBAL debug_dbug = "";
83 SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
84 connection node_2a;
85 set session wsrep_sync_wait=15;
86 SELECT COUNT(*) = 1 FROM test.t1 WHERE f2 = 'e';
87 COUNT(*) = 1
88 1
89 set session wsrep_sync_wait=0;
90 STOP SLAVE;
91 RESET SLAVE;
92 SET DEBUG_SYNC = "RESET";
93 DROP TABLE t1;
94 connection node_3;
95 DROP TABLE t1;
96 RESET MASTER;
97 connection node_1;
98 disconnect node_2a;
99 disconnect node_3;