Debian Codegraph @

mysql-test/suite/rpl/r/master_last_event_time_stmt.result

raw
1 include/rpl_init.inc [topology=1->2->3]
2 connection server_3;
3 include/stop_slave.inc
4 connection server_1;
5 call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
6 alter table mysql.gtid_slave_pos engine=innodb;
7 create table t1 (a int) engine=aria;
8 create table t2 (a int) engine=innodb;
9 include/save_master_gtid.inc
10 # Sleep 1 to ensure setup DDL and test statements have different binlog timestamps
11 connection server_2;
12 set @old_par_thds= @@global.slave_parallel_threads;
13 #
14 # Ensure that the slave doesn't overwrite exec_time when binlogging
15 #
16 connection server_2;
17 include/sync_with_master_gtid.inc
18 include/stop_slave.inc
19 change master to master_delay=SLAVE_DELAY;
20 include/start_slave.inc
21 connection server_2;
22 include/stop_slave.inc
23 set @@global.slave_parallel_threads= 0;
24 include/start_slave.inc
25 connection server_2;
26 flush logs;
27 connection server_1;
28 # Only sleep on master so the real execution time on the slave is less
29 insert into t1 values (sleep(if(@@global.server_id=1, 2, 0)));
30 include/save_master_gtid.inc
31 # Waiting for slave to delay and commit transaction..
32 connection server_2;
33 include/sync_with_master_gtid.inc
34 # MYSQL_BINLOG slave_local_binlog > slave_outfile
35 include/assert_grep.inc [Ensure serial slave doesn't overwrite exec_time in the binlog event (0s)]
36 include/assert_grep.inc [Ensure serial slave doesn't overwrite exec_time in the binlog event (1s)]
37 #
38 # Test that changes are properly applied by server_2 and server_3
39 #
40 connection server_1;
41 include/save_master_pos.inc
42 connection server_2;
43 include/wait_for_slave_param.inc [Relay_Master_Log_File]
44 include/wait_for_slave_param.inc [Exec_Master_Log_Pos]
45 include/save_master_pos.inc
46 # Show that the server_2 received the insert from master
47 select * from t1;
48 a
49 0
50 master <> NULL; Should be 1
51 1
52 master_time == slave_time ; Should be 1
53 1
54 connection server_3;
55 include/start_slave.inc
56 include/wait_for_slave_param.inc [Relay_Master_Log_File]
57 include/wait_for_slave_param.inc [Exec_Master_Log_Pos]
58 # Show that the server_3 received the insert from master
59 select * from t1;
60 a
61 0
62 master <> NULL; Should be 1
63 1
64 master_time == slave_time ; Should be 1
65 1
66 include/stop_slave.inc
67 connection server_1;
68 connection server_2;
69 include/stop_slave.inc
70 set @@global.slave_parallel_threads= @old_par_thds;
71 include/start_slave.inc
72 connection server_2;
73 include/stop_slave.inc
74 set @@global.slave_parallel_threads= 1;
75 include/start_slave.inc
76 connection server_2;
77 flush logs;
78 connection server_1;
79 # Only sleep on master so the real execution time on the slave is less
80 insert into t1 values (sleep(if(@@global.server_id=1, 2, 0)));
81 include/save_master_gtid.inc
82 # Waiting for slave to delay and commit transaction..
83 connection server_2;
84 include/sync_with_master_gtid.inc
85 # MYSQL_BINLOG slave_local_binlog > slave_outfile
86 include/assert_grep.inc [Ensure parallel slave doesn't overwrite exec_time in the binlog event (0s)]
87 include/assert_grep.inc [Ensure parallel slave doesn't overwrite exec_time in the binlog event (1s)]
88 #
89 # Test that changes are properly applied by server_2 and server_3
90 #
91 connection server_1;
92 include/save_master_pos.inc
93 connection server_2;
94 include/wait_for_slave_param.inc [Relay_Master_Log_File]
95 include/wait_for_slave_param.inc [Exec_Master_Log_Pos]
96 include/save_master_pos.inc
97 # Show that the server_2 received the insert from master
98 select * from t1;
99 a
100 0
101 0
102 master <> NULL; Should be 1
103 1
104 master_time == slave_time ; Should be 1
105 1
106 connection server_3;
107 include/start_slave.inc
108 include/wait_for_slave_param.inc [Relay_Master_Log_File]
109 include/wait_for_slave_param.inc [Exec_Master_Log_Pos]
110 # Show that the server_3 received the insert from master
111 select * from t1;
112 a
113 0
114 0
115 master <> NULL; Should be 1
116 1
117 master_time == slave_time ; Should be 1
118 1
119 include/stop_slave.inc
120 connection server_1;
121 connection server_2;
122 include/stop_slave.inc
123 set @@global.slave_parallel_threads= @old_par_thds;
124 include/start_slave.inc
125 #
126 # Cleanup
127 connection server_2;
128 include/stop_slave.inc
129 change master to master_delay=0;
130 include/start_slave.inc
131 connection server_3;
132 include/start_slave.inc
133 connection server_1;
134 drop table t1;
135 drop table t2;
136 include/rpl_end.inc
137 # End of master_last_event_time_stmt