📄 rpl_max_relay_size.result
字号:
stop slave;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;start slave;stop slave;## Generate a big enough master's binlog to cause relay log rotations#create table t1 (a int);drop table t1;reset slave;## Test 1#set @my_max_binlog_size= @@global.max_binlog_size;set global max_binlog_size=8192;set global max_relay_log_size=8192-1;select @@global.max_relay_log_size;@@global.max_relay_log_size4096start slave;show slave status;Slave_IO_State #Master_Host 127.0.0.1Master_User rootMaster_Port MASTER_PORTConnect_Retry 1Master_Log_File master-bin.000001Read_Master_Log_Pos 72952Relay_Log_File #Relay_Log_Pos #Relay_Master_Log_File master-bin.000001Slave_IO_Running YesSlave_SQL_Running YesReplicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno 0Last_Error Skip_Counter 0Exec_Master_Log_Pos 72952Relay_Log_Space #Until_Condition NoneUntil_Log_File Until_Log_Pos 0Master_SSL_Allowed NoMaster_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master ### Test 2#stop slave;reset slave;set global max_relay_log_size=(5*4096);select @@global.max_relay_log_size;@@global.max_relay_log_size 20480start slave;show slave status;Slave_IO_State #Master_Host 127.0.0.1Master_User rootMaster_Port MASTER_PORTConnect_Retry 1Master_Log_File master-bin.000001Read_Master_Log_Pos 72952Relay_Log_File #Relay_Log_Pos #Relay_Master_Log_File master-bin.000001Slave_IO_Running YesSlave_SQL_Running YesReplicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno 0Last_Error Skip_Counter 0Exec_Master_Log_Pos 72952Relay_Log_Space #Until_Condition NoneUntil_Log_File Until_Log_Pos 0Master_SSL_Allowed NoMaster_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master ### Test 3: max_relay_log_size = 0#stop slave;reset slave;set global max_relay_log_size=0;select @@global.max_relay_log_size;@@global.max_relay_log_size 0start slave;show slave status;Slave_IO_State #Master_Host 127.0.0.1Master_User rootMaster_Port MASTER_PORTConnect_Retry 1Master_Log_File master-bin.000001Read_Master_Log_Pos 72952Relay_Log_File #Relay_Log_Pos #Relay_Master_Log_File master-bin.000001Slave_IO_Running YesSlave_SQL_Running YesReplicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno 0Last_Error Skip_Counter 0Exec_Master_Log_Pos 72952Relay_Log_Space #Until_Condition NoneUntil_Log_File Until_Log_Pos 0Master_SSL_Allowed NoMaster_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master ### Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions#stop slave;reset slave;flush logs;show slave status;Slave_IO_State #Master_Host 127.0.0.1Master_User rootMaster_Port MASTER_PORTConnect_Retry 1Master_Log_File Read_Master_Log_Pos 4Relay_Log_File #Relay_Log_Pos #Relay_Master_Log_File Slave_IO_Running NoSlave_SQL_Running NoReplicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno 0Last_Error Skip_Counter 0Exec_Master_Log_Pos 0Relay_Log_Space #Until_Condition NoneUntil_Log_File Until_Log_Pos 0Master_SSL_Allowed NoMaster_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master ### Test 5#reset slave;start slave;flush logs;create table t1 (a int);show slave status;Slave_IO_State #Master_Host 127.0.0.1Master_User rootMaster_Port MASTER_PORTConnect_Retry 1Master_Log_File master-bin.000001Read_Master_Log_Pos 73038Relay_Log_File #Relay_Log_Pos #Relay_Master_Log_File master-bin.000001Slave_IO_Running YesSlave_SQL_Running YesReplicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno 0Last_Error Skip_Counter 0Exec_Master_Log_Pos 73038Relay_Log_Space #Until_Condition NoneUntil_Log_File Until_Log_Pos 0Master_SSL_Allowed NoMaster_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master ### Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated#flush logs;drop table t1;show slave status;Slave_IO_State #Master_Host 127.0.0.1Master_User rootMaster_Port MASTER_PORTConnect_Retry 1Master_Log_File master-bin.000001Read_Master_Log_Pos 73114Relay_Log_File #Relay_Log_Pos #Relay_Master_Log_File master-bin.000001Slave_IO_Running YesSlave_SQL_Running YesReplicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno 0Last_Error Skip_Counter 0Exec_Master_Log_Pos 73114Relay_Log_Space #Until_Condition NoneUntil_Log_File Until_Log_Pos 0Master_SSL_Allowed NoMaster_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master #flush logs;show master status;File master-bin.000002Position 98Binlog_Do_DB Binlog_Ignore_DB set global max_binlog_size= @my_max_binlog_size;## End of 4.1 tests#
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -