include/master-slave.inc Warnings: Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information. [connection master] call mtr.add_suppression('Replica can not handle replication events with the checksum that source is configured to log'); call mtr.add_suppression('Replication event checksum verification failed'); call mtr.add_suppression('Relay log write failure: could not queue event from source'); call mtr.add_suppression('Event crc check failed! Most likely there is event corruption'); call mtr.add_suppression("Replica SQL for channel '': Error initializing relay log position: I/O error reading event at position .*, Error_code: MY-013117"); call mtr.add_suppression('Source is configured to log replication events with checksum, but will not send such events to replicas that cannot process'); set @master_save_binlog_checksum= @@global.binlog_checksum; set @save_source_verify_checksum = @@global.source_verify_checksum; select @@global.binlog_checksum as 'must be CRC32 because of the command line option'; must be CRC32 because of the command line option CRC32 select @@session.binlog_checksum as 'no session var'; ERROR HY000: Variable 'binlog_checksum' is a GLOBAL variable select @@global.source_verify_checksum as 'must be zero because of default'; must be zero because of default 0 select @@session.source_verify_checksum as 'no session var'; ERROR HY000: Variable 'source_verify_checksum' is a GLOBAL variable set @slave_save_binlog_checksum= @@global.binlog_checksum; set @save_replica_sql_verify_checksum = @@global.replica_sql_verify_checksum; select @@global.replica_sql_verify_checksum as 'must be one because of default'; must be one because of default 1 select @@session.replica_sql_verify_checksum as 'no session var'; ERROR HY000: Variable 'replica_sql_verify_checksum' is a GLOBAL variable show binary logs; Log_name File_size Encrypted master-bin.000001 # # set @@global.binlog_checksum = NONE; *** must be rotations seen *** show binary logs; Log_name File_size Encrypted master-bin.000001 # # master-bin.000002 # # set @@global.binlog_checksum = default; set @@global.binlog_checksum = CRC32; set @@global.binlog_checksum = CRC32; set @@global.source_verify_checksum = 0; set @@global.source_verify_checksum = default; set @@global.binlog_checksum = ADLER32; ERROR 42000: Variable 'binlog_checksum' can't be set to the value of 'ADLER32' set @@global.source_verify_checksum = 2; ERROR 42000: Variable 'source_verify_checksum' can't be set to the value of '2' set @@global.replica_sql_verify_checksum = 0; set @@global.replica_sql_verify_checksum = default; set @@global.replica_sql_verify_checksum = 2; ERROR 42000: Variable 'replica_sql_verify_checksum' can't be set to the value of '2' set @@global.binlog_checksum = NONE; create table t1 (a int); flush logs; flush logs; flush logs; flush logs; flush logs; flush logs; select count(*) as zero from t1; zero 0 include/stop_slave.inc set @@global.binlog_checksum = CRC32; insert into t1 values (1) /* will not be applied on slave due to simulation */; set @@global.debug='+d,simulate_replica_unaware_checksum'; start slave; Warnings: Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead include/wait_for_slave_io_error.inc [errno=13114] Last_IO_Error = 'Got fatal error 1236 from source when reading data from binary log: 'Replica can not handle replication events with the checksum that source is configured to log; the first event 'master-bin.000009' at XXX, the last event read from './master-bin.000010' at XXX, the last byte read from './master-bin.000010' at XXX.'' select count(*) as zero from t1; zero 0 include/stop_slave.inc set @@global.debug='-d,simulate_replica_unaware_checksum'; include/start_slave.inc set @@global.source_verify_checksum = 1; set @@session.debug='+d,simulate_checksum_test_failure'; show binlog events; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Error reading Log_event at position 4: Failed decoding event: Event crc check failed! Most likely there is event corruption. set @@session.debug='-d,simulate_checksum_test_failure'; set @@global.source_verify_checksum = default; include/stop_slave.inc create table t2 (a int); set @@global.debug='+d,simulate_checksum_test_failure'; start slave io_thread; Warnings: Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead include/wait_for_slave_io_error.inc [errno=13122, 13115] set @@global.debug='-d,simulate_checksum_test_failure'; start slave io_thread; Warnings: Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead include/sync_slave_io_with_master.inc set @@global.replica_sql_verify_checksum = 1; set @@global.debug='+d,simulate_checksum_test_failure'; start slave sql_thread; Warnings: Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead include/wait_for_slave_sql_error.inc [errno=13117] Last_SQL_Error = 'Event crc check failed! Most likely there is event corruption.' include/stop_slave.inc set @@global.debug='-d,simulate_checksum_test_failure'; include/start_slave.inc select count(*) as 'must be zero' from t2; must be zero 0 stop slave; Warnings: Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead reset slave; Warnings: Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead reset master; set @@global.binlog_checksum= IF(floor((rand()*1000)%2), "CRC32", "NONE"); flush logs; set @@global.binlog_checksum= CRC32; reset master; flush logs; create table t3 (a int, b char(5)); include/start_slave.inc select count(*) as 'must be zero' from t3; must be zero 0 include/stop_slave.inc CHANGE REPLICATION SOURCE to SOURCE_HOST='127.0.0.1',SOURCE_PORT=MASTER_PORT, SOURCE_USER='root'; Warnings: Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information. flush logs; reset master; insert into t3 value (1, @@global.binlog_checksum); include/start_slave.inc flush logs; select count(*) as 'must be one' from t3; must be one 1 set @@global.binlog_checksum= IF(floor((rand()*1000)%2), "CRC32", "NONE"); insert into t3 value (1, @@global.binlog_checksum); drop table t1, t2, t3; set @@global.binlog_checksum = @master_save_binlog_checksum; set @@global.source_verify_checksum = @save_source_verify_checksum; set @@global.binlog_checksum = @slave_save_binlog_checksum; set @@global.replica_sql_verify_checksum = @save_replica_sql_verify_checksum; include/rpl_end.inc