1
SET SESSION BINLOG_FORMAT=ROW;
2
SET GLOBAL BINLOG_FORMAT=ROW;
4
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
7
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
11
# Generate a big enough master's binlog to cause relay log rotations
13
create table t1 (a int);
19
set @my_max_binlog_size= @@global.max_binlog_size;
20
set global max_binlog_size=8192;
21
set global max_relay_log_size=8192-1;
22
select @@global.max_relay_log_size;
23
@@global.max_relay_log_size
30
Master_Port MASTER_PORT
32
Master_Log_File master-bin.000001
36
Relay_Master_Log_File master-bin.000001
42
Replicate_Ignore_Table #
43
Replicate_Wild_Do_Table
44
Replicate_Wild_Ignore_Table
59
Seconds_Behind_Master #
60
Master_SSL_Verify_Server_Cert No
70
set global max_relay_log_size=(5*4096);
71
select @@global.max_relay_log_size;
72
@@global.max_relay_log_size 20480
78
Master_Port MASTER_PORT
80
Master_Log_File master-bin.000001
84
Relay_Master_Log_File master-bin.000001
90
Replicate_Ignore_Table #
91
Replicate_Wild_Do_Table
92
Replicate_Wild_Ignore_Table
101
Master_SSL_Allowed No
107
Seconds_Behind_Master #
108
Master_SSL_Verify_Server_Cert No
114
# Test 3: max_relay_log_size = 0
118
set global max_relay_log_size=0;
119
select @@global.max_relay_log_size;
120
@@global.max_relay_log_size 0
124
Master_Host 127.0.0.1
126
Master_Port MASTER_PORT
128
Master_Log_File master-bin.000001
129
Read_Master_Log_Pos #
132
Relay_Master_Log_File master-bin.000001
134
Slave_SQL_Running Yes
138
Replicate_Ignore_Table #
139
Replicate_Wild_Do_Table
140
Replicate_Wild_Ignore_Table
144
Exec_Master_Log_Pos #
149
Master_SSL_Allowed No
155
Seconds_Behind_Master #
156
Master_SSL_Verify_Server_Cert No
162
# Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions
169
Master_Host 127.0.0.1
171
Master_Port MASTER_PORT
174
Read_Master_Log_Pos #
177
Relay_Master_Log_File
183
Replicate_Ignore_Table #
184
Replicate_Wild_Do_Table
185
Replicate_Wild_Ignore_Table
189
Exec_Master_Log_Pos #
194
Master_SSL_Allowed No
200
Seconds_Behind_Master #
201
Master_SSL_Verify_Server_Cert No
212
create table t1 (a int);
215
Master_Host 127.0.0.1
217
Master_Port MASTER_PORT
219
Master_Log_File master-bin.000001
220
Read_Master_Log_Pos #
223
Relay_Master_Log_File master-bin.000001
225
Slave_SQL_Running Yes
229
Replicate_Ignore_Table #
230
Replicate_Wild_Do_Table
231
Replicate_Wild_Ignore_Table
235
Exec_Master_Log_Pos #
240
Master_SSL_Allowed No
246
Seconds_Behind_Master #
247
Master_SSL_Verify_Server_Cert No
253
# Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated
259
Master_Host 127.0.0.1
261
Master_Port MASTER_PORT
263
Master_Log_File master-bin.000001
264
Read_Master_Log_Pos #
267
Relay_Master_Log_File master-bin.000001
269
Slave_SQL_Running Yes
273
Replicate_Ignore_Table #
274
Replicate_Wild_Do_Table
275
Replicate_Wild_Ignore_Table
279
Exec_Master_Log_Pos #
284
Master_SSL_Allowed No
290
Seconds_Behind_Master #
291
Master_SSL_Verify_Server_Cert No
298
File Position Binlog_Do_DB Binlog_Ignore_DB
299
master-bin.000002 # <Binlog_Do_DB> <Binlog_Ignore_DB>
300
set global max_binlog_size= @my_max_binlog_size;