⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.124
Server IP:
50.28.103.30
Server:
Linux host.jcukjv-lwsites.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
Server Software:
nginx/1.28.0
PHP Version:
8.3.12
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
www
/
server
/
mysql
/
mysql-test
/
suite
/
rpl
/
t
/
View File Name :
rpl_gtid_mts_recovery_with_missing_relay_log.test
# === Purpose === # # This test verifies that MTS crash recovery succeeds with GTID Auto Position=ON # and --relay-log-recovery=ON irrespective of repository type when relay logs # that are required to fill the gaps are missing. # # === Implementation ==== # # 1. Slave is made to crash at a state where gaps are present in MTS execution. # This is done by sourcing # "extra/rpl_tests/rpl_generate_mts_gap_with_missing_relaylog_begin.inc" file which # simulates MTS gaps and removes the relay logs that are required to fill MTS # gaps. # # 2. Verify that MTS recovery succeeds on restarting the slave with # --relay-log-recovery=ON. # # 3. Perform cleanup by sourcing # "extra/rpl_tests/rpl_generate_mts_gap_with_missing_relaylog_end.inc" # # === References === # # Bug#28830834: MTS NOT REPLICATION CRASH-SAFE WITH GTID AND ALL THE RIGHT PARAMETERS. # # This test case is binlog format agnostic --source include/have_binlog_format_row.inc --source include/have_slave_parallel_type_database.inc --source include/only_mts_slave_parallel_workers.inc --source include/master-slave.inc --source include/rpl_connection_slave.inc --let $MYSQLD_DATADIR= `SELECT @@datadir` CALL mtr.add_suppression("Error looking for file after*"); CALL mtr.add_suppression("Recovery from master pos*"); --let $k=1 while($k >= 0) { # Enable Master Auto Position --source include/stop_slave.inc CHANGE MASTER TO MASTER_AUTO_POSITION=1; --source include/start_slave.inc # 1. Slave is made to crash at a state where gaps are present in MTS execution. # This is done by sourcing # "extra/rpl_tests/rpl_generate_mts_gap_with_missing_relaylog_begin.inc" file which # simulates MTS gaps and removes the relay logs that are required to fill MTS # gaps. --source extra/rpl_tests/rpl_generate_mts_gap_with_missing_relaylog_begin.inc --source include/rpl_connection_slave.inc --let $rpl_server_number= 2 --let $rpl_start_with_gtids= 1 --let $rpl_server_parameters= --skip_slave_start=1 --sync_master_info=1 --relay-log-recovery=$k --source include/rpl_start_server.inc # Due to Bug#29931117, executing START SLAVE after restarting the server # with RELAY_LOG_RECOVERY=OFF throws an error. # Restart with RELEAY_LOG_RECOVERY=ON to complete the recovery. if($k==0) { --error ER_MASTER_INFO START SLAVE; --echo "Restart server with RELAY_LOG_RECOVERY=ON followed by START SLAVE --let $rpl_server_parameters= --skip_slave_start=1 --sync_master_info=1 --relay-log-recovery=1 --source include/rpl_restart_server.inc --source include/start_slave.inc } # 2. Verify that MTS recovery succeeds on restarting the slave with # --relay-log-recovery=ON. if($k==1) { --source include/start_slave.inc } --source include/rpl_connection_master.inc --source include/sync_slave_sql_with_master.inc # Compare the tables on master and slave they should be in sync let $m=2; while($m) { --let diff_tables=master:d$m.t, slave:d$m.t --source include/diff_tables.inc --dec $m } # Cleanup is done by sourcing # extra/rpl_tests/rpl_generate_mts_gap_with_missing_relaylog_end.inc --source extra/rpl_tests/rpl_generate_mts_gap_with_missing_relaylog_end.inc --dec $k } --source include/rpl_end.inc