2
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
5
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
9
# Generate a big enough master's binlog to cause relay log rotations
11
create table t1 (a int);
17
set @my_max_binlog_size= @@global.max_binlog_size;
18
set global max_binlog_size=8192;
19
set global max_relay_log_size=8192-1;
20
select @@global.max_relay_log_size;
21
@@global.max_relay_log_size
28
Master_Port MASTER_PORT
30
Master_Log_File master-bin.000001
34
Relay_Master_Log_File master-bin.000001
40
Replicate_Ignore_Table #
41
Replicate_Wild_Do_Table
42
Replicate_Wild_Ignore_Table
57
Seconds_Behind_Master #
58
Master_SSL_Verify_Server_Cert No
68
set global max_relay_log_size=(5*4096);
69
select @@global.max_relay_log_size;
70
@@global.max_relay_log_size 20480
76
Master_Port MASTER_PORT
78
Master_Log_File master-bin.000001
82
Relay_Master_Log_File master-bin.000001
88
Replicate_Ignore_Table #
89
Replicate_Wild_Do_Table
90
Replicate_Wild_Ignore_Table
105
Seconds_Behind_Master #
106
Master_SSL_Verify_Server_Cert No
112
# Test 3: max_relay_log_size = 0
116
set global max_relay_log_size=0;
117
select @@global.max_relay_log_size;
118
@@global.max_relay_log_size 0
122
Master_Host 127.0.0.1
124
Master_Port MASTER_PORT
126
Master_Log_File master-bin.000001
127
Read_Master_Log_Pos #
130
Relay_Master_Log_File master-bin.000001
132
Slave_SQL_Running Yes
136
Replicate_Ignore_Table #
137
Replicate_Wild_Do_Table
138
Replicate_Wild_Ignore_Table
142
Exec_Master_Log_Pos #
147
Master_SSL_Allowed No
153
Seconds_Behind_Master #
154
Master_SSL_Verify_Server_Cert No
160
# Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions
167
Master_Host 127.0.0.1
169
Master_Port MASTER_PORT
172
Read_Master_Log_Pos #
175
Relay_Master_Log_File
181
Replicate_Ignore_Table #
182
Replicate_Wild_Do_Table
183
Replicate_Wild_Ignore_Table
187
Exec_Master_Log_Pos #
192
Master_SSL_Allowed No
198
Seconds_Behind_Master #
199
Master_SSL_Verify_Server_Cert No
210
create table t1 (a int);
213
Master_Host 127.0.0.1
215
Master_Port MASTER_PORT
217
Master_Log_File master-bin.000001
218
Read_Master_Log_Pos #
221
Relay_Master_Log_File master-bin.000001
223
Slave_SQL_Running Yes
227
Replicate_Ignore_Table #
228
Replicate_Wild_Do_Table
229
Replicate_Wild_Ignore_Table
233
Exec_Master_Log_Pos #
238
Master_SSL_Allowed No
244
Seconds_Behind_Master #
245
Master_SSL_Verify_Server_Cert No
251
# Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated
257
Master_Host 127.0.0.1
259
Master_Port MASTER_PORT
261
Master_Log_File master-bin.000001
262
Read_Master_Log_Pos #
265
Relay_Master_Log_File master-bin.000001
267
Slave_SQL_Running Yes
271
Replicate_Ignore_Table #
272
Replicate_Wild_Do_Table
273
Replicate_Wild_Ignore_Table
277
Exec_Master_Log_Pos #
282
Master_SSL_Allowed No
288
Seconds_Behind_Master #
289
Master_SSL_Verify_Server_Cert No
296
File Position Binlog_Do_DB Binlog_Ignore_DB
297
master-bin.000002 # <Binlog_Do_DB> <Binlog_Ignore_DB>
298
set global max_binlog_size= @my_max_binlog_size;