rpl_row_max_relay_size.result 6.02 KB
Newer Older
unknown's avatar
unknown committed
1 2
SET SESSION BINLOG_FORMAT=ROW;
SET GLOBAL BINLOG_FORMAT=ROW;
unknown's avatar
unknown committed
3
stop slave;
4 5 6 7
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
unknown's avatar
unknown committed
8
start slave;
9
stop slave;
unknown's avatar
unknown committed
10 11 12
#
# Generate a big enough master's binlog to cause relay log rotations
#
13 14 15
create table t1 (a int);
drop table t1;
reset slave;
unknown's avatar
unknown committed
16 17 18
#
# Test 1
#
19
set @my_max_binlog_size= @@global.max_binlog_size;
20 21 22 23 24 25
set global max_binlog_size=8192;
set global max_relay_log_size=8192-1;
select @@global.max_relay_log_size;
@@global.max_relay_log_size
4096
start slave;
26
SHOW SLAVE STATUS;
unknown's avatar
unknown committed
27 28 29 30 31 32
Slave_IO_State	#
Master_Host	127.0.0.1
Master_User	root
Master_Port	MASTER_PORT
Connect_Retry	1
Master_Log_File	master-bin.000001
unknown's avatar
unknown committed
33
Read_Master_Log_Pos	58668
unknown's avatar
unknown committed
34 35 36 37 38 39 40 41 42 43 44 45 46 47
Relay_Log_File	#
Relay_Log_Pos	#
Relay_Master_Log_File	master-bin.000001
Slave_IO_Running	Yes
Slave_SQL_Running	Yes
Replicate_Do_DB	
Replicate_Ignore_DB	
Replicate_Do_Table	
Replicate_Ignore_Table	#
Replicate_Wild_Do_Table	
Replicate_Wild_Ignore_Table	
Last_Errno	0
Last_Error	
Skip_Counter	0
unknown's avatar
unknown committed
48
Exec_Master_Log_Pos	58668
unknown's avatar
unknown committed
49 50 51 52 53 54 55 56 57 58 59
Relay_Log_Space	#
Until_Condition	None
Until_Log_File	
Until_Log_Pos	0
Master_SSL_Allowed	No
Master_SSL_CA_File	
Master_SSL_CA_Path	
Master_SSL_Cert	
Master_SSL_Cipher	
Master_SSL_Key	
Seconds_Behind_Master	#
60
Master_SSL_Verify_Server_Cert	No
61 62 63 64
Last_IO_Errno	#
Last_IO_Error	#
Last_SQL_Errno	0
Last_SQL_Error	
unknown's avatar
unknown committed
65 66 67
#
# Test 2
#
68 69 70 71
stop slave;
reset slave;
set global max_relay_log_size=(5*4096);
select @@global.max_relay_log_size;
unknown's avatar
unknown committed
72
@@global.max_relay_log_size	20480
73
start slave;
74
SHOW SLAVE STATUS;
unknown's avatar
unknown committed
75 76 77 78 79 80
Slave_IO_State	#
Master_Host	127.0.0.1
Master_User	root
Master_Port	MASTER_PORT
Connect_Retry	1
Master_Log_File	master-bin.000001
unknown's avatar
unknown committed
81
Read_Master_Log_Pos	58668
unknown's avatar
unknown committed
82 83 84 85 86 87 88 89 90 91 92 93 94 95
Relay_Log_File	#
Relay_Log_Pos	#
Relay_Master_Log_File	master-bin.000001
Slave_IO_Running	Yes
Slave_SQL_Running	Yes
Replicate_Do_DB	
Replicate_Ignore_DB	
Replicate_Do_Table	
Replicate_Ignore_Table	#
Replicate_Wild_Do_Table	
Replicate_Wild_Ignore_Table	
Last_Errno	0
Last_Error	
Skip_Counter	0
unknown's avatar
unknown committed
96
Exec_Master_Log_Pos	58668
unknown's avatar
unknown committed
97 98 99 100 101 102 103 104 105 106 107
Relay_Log_Space	#
Until_Condition	None
Until_Log_File	
Until_Log_Pos	0
Master_SSL_Allowed	No
Master_SSL_CA_File	
Master_SSL_CA_Path	
Master_SSL_Cert	
Master_SSL_Cipher	
Master_SSL_Key	
Seconds_Behind_Master	#
108
Master_SSL_Verify_Server_Cert	No
109 110 111 112
Last_IO_Errno	#
Last_IO_Error	#
Last_SQL_Errno	0
Last_SQL_Error	
unknown's avatar
unknown committed
113 114 115
#
# Test 3: max_relay_log_size = 0
#
116 117 118 119
stop slave;
reset slave;
set global max_relay_log_size=0;
select @@global.max_relay_log_size;
unknown's avatar
unknown committed
120
@@global.max_relay_log_size	0
121
start slave;
122
SHOW SLAVE STATUS;
unknown's avatar
unknown committed
123 124 125 126 127 128
Slave_IO_State	#
Master_Host	127.0.0.1
Master_User	root
Master_Port	MASTER_PORT
Connect_Retry	1
Master_Log_File	master-bin.000001
unknown's avatar
unknown committed
129
Read_Master_Log_Pos	58668
unknown's avatar
unknown committed
130 131 132 133 134 135 136 137 138 139 140 141 142 143
Relay_Log_File	#
Relay_Log_Pos	#
Relay_Master_Log_File	master-bin.000001
Slave_IO_Running	Yes
Slave_SQL_Running	Yes
Replicate_Do_DB	
Replicate_Ignore_DB	
Replicate_Do_Table	
Replicate_Ignore_Table	#
Replicate_Wild_Do_Table	
Replicate_Wild_Ignore_Table	
Last_Errno	0
Last_Error	
Skip_Counter	0
unknown's avatar
unknown committed
144
Exec_Master_Log_Pos	58668
unknown's avatar
unknown committed
145 146 147 148 149 150 151 152 153 154 155
Relay_Log_Space	#
Until_Condition	None
Until_Log_File	
Until_Log_Pos	0
Master_SSL_Allowed	No
Master_SSL_CA_File	
Master_SSL_CA_Path	
Master_SSL_Cert	
Master_SSL_Cipher	
Master_SSL_Key	
Seconds_Behind_Master	#
156
Master_SSL_Verify_Server_Cert	No
157 158 159 160
Last_IO_Errno	#
Last_IO_Error	#
Last_SQL_Errno	0
Last_SQL_Error	
unknown's avatar
unknown committed
161 162 163
#
# Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions
#
164 165 166
stop slave;
reset slave;
flush logs;
167
SHOW SLAVE STATUS;
unknown's avatar
unknown committed
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200
Slave_IO_State	#
Master_Host	127.0.0.1
Master_User	root
Master_Port	MASTER_PORT
Connect_Retry	1
Master_Log_File	
Read_Master_Log_Pos	4
Relay_Log_File	#
Relay_Log_Pos	#
Relay_Master_Log_File	
Slave_IO_Running	No
Slave_SQL_Running	No
Replicate_Do_DB	
Replicate_Ignore_DB	
Replicate_Do_Table	
Replicate_Ignore_Table	#
Replicate_Wild_Do_Table	
Replicate_Wild_Ignore_Table	
Last_Errno	0
Last_Error	
Skip_Counter	0
Exec_Master_Log_Pos	0
Relay_Log_Space	#
Until_Condition	None
Until_Log_File	
Until_Log_Pos	0
Master_SSL_Allowed	No
Master_SSL_CA_File	
Master_SSL_CA_Path	
Master_SSL_Cert	
Master_SSL_Cipher	
Master_SSL_Key	
Seconds_Behind_Master	#
201
Master_SSL_Verify_Server_Cert	No
202 203 204 205
Last_IO_Errno	#
Last_IO_Error	#
Last_SQL_Errno	0
Last_SQL_Error	
unknown's avatar
unknown committed
206 207 208
#
# Test 5
#
209 210 211 212
reset slave;
start slave;
flush logs;
create table t1 (a int);
213
SHOW SLAVE STATUS;
unknown's avatar
unknown committed
214 215 216 217 218 219
Slave_IO_State	#
Master_Host	127.0.0.1
Master_User	root
Master_Port	MASTER_PORT
Connect_Retry	1
Master_Log_File	master-bin.000001
unknown's avatar
unknown committed
220
Read_Master_Log_Pos	58754
unknown's avatar
unknown committed
221 222 223 224 225 226 227 228 229 230 231 232 233 234
Relay_Log_File	#
Relay_Log_Pos	#
Relay_Master_Log_File	master-bin.000001
Slave_IO_Running	Yes
Slave_SQL_Running	Yes
Replicate_Do_DB	
Replicate_Ignore_DB	
Replicate_Do_Table	
Replicate_Ignore_Table	#
Replicate_Wild_Do_Table	
Replicate_Wild_Ignore_Table	
Last_Errno	0
Last_Error	
Skip_Counter	0
unknown's avatar
unknown committed
235
Exec_Master_Log_Pos	58754
unknown's avatar
unknown committed
236 237 238 239 240 241 242 243 244 245 246
Relay_Log_Space	#
Until_Condition	None
Until_Log_File	
Until_Log_Pos	0
Master_SSL_Allowed	No
Master_SSL_CA_File	
Master_SSL_CA_Path	
Master_SSL_Cert	
Master_SSL_Cipher	
Master_SSL_Key	
Seconds_Behind_Master	#
247
Master_SSL_Verify_Server_Cert	No
248 249 250 251
Last_IO_Errno	#
Last_IO_Error	#
Last_SQL_Errno	0
Last_SQL_Error	
unknown's avatar
unknown committed
252 253 254
#
# Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated
#
255 256
flush logs;
drop table t1;
257
SHOW SLAVE STATUS;
unknown's avatar
unknown committed
258 259 260 261 262 263
Slave_IO_State	#
Master_Host	127.0.0.1
Master_User	root
Master_Port	MASTER_PORT
Connect_Retry	1
Master_Log_File	master-bin.000001
unknown's avatar
unknown committed
264
Read_Master_Log_Pos	58830
unknown's avatar
unknown committed
265 266 267 268 269 270 271 272 273 274 275 276 277 278
Relay_Log_File	#
Relay_Log_Pos	#
Relay_Master_Log_File	master-bin.000001
Slave_IO_Running	Yes
Slave_SQL_Running	Yes
Replicate_Do_DB	
Replicate_Ignore_DB	
Replicate_Do_Table	
Replicate_Ignore_Table	#
Replicate_Wild_Do_Table	
Replicate_Wild_Ignore_Table	
Last_Errno	0
Last_Error	
Skip_Counter	0
unknown's avatar
unknown committed
279
Exec_Master_Log_Pos	58830
unknown's avatar
unknown committed
280 281 282 283 284 285 286 287 288 289 290
Relay_Log_Space	#
Until_Condition	None
Until_Log_File	
Until_Log_Pos	0
Master_SSL_Allowed	No
Master_SSL_CA_File	
Master_SSL_CA_Path	
Master_SSL_Cert	
Master_SSL_Cipher	
Master_SSL_Key	
Seconds_Behind_Master	#
291
Master_SSL_Verify_Server_Cert	No
292 293 294 295
Last_IO_Errno	#
Last_IO_Error	#
Last_SQL_Errno	0
Last_SQL_Error	
296 297
flush logs;
show master status;
unknown's avatar
unknown committed
298
File	master-bin.000002
unknown's avatar
unknown committed
299
Position	106
unknown's avatar
unknown committed
300 301
Binlog_Do_DB	<Binlog_Ignore_DB>
Binlog_Ignore_DB	
302
set global max_binlog_size= @my_max_binlog_size;
unknown's avatar
unknown committed
303 304 305
#
# End of 4.1 tests
#