Server IP : 172.67.216.182 / Your IP : 162.158.108.134 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /www/server/mysql/src/mysql-test/suite/rpl/t/ |
Upload File : |
# ==== Purpose ==== # # Bug #20644100 "Event crc check failed" when master disable binlog_checksum # # Starting slave sql_thread to apply events will cause event crc check # failure when master disables binlog_checksum. # # Currently relay logs have the following sequence (starting from # position 4): # Format_desc (of slave) # Previous-GTIDs (of slave, if GTIDs are enabled) # Rotate (of master) # Format_desc (of master) # The Format_desc which really describes the rest of the relay # log is the 4rd event, which is from master. # Relay_log_info::init_relay_log_pos(...) will look for a # Format_description_log_event from master. We only need this when # slave applier thread starts and opens an existing relay log and # has to execute it (possibly from an offset >4), because we need # to read the description event of the relay log to be able to # parse the events we have to execute. # But the current code supposed that relay logs have the following # sequence (starting from position 4): # Format_desc (of slave) # Rotate (of master) # Format_desc (of master) # So the function failed to find the Format_description_log_event # from master when slave applier thread starts and opens an existing # relay log and has to execute it, which causes some failures. # The event crc check failure is one of them. # # Fix code to let slave applier thread also skip the Previous-GTIDs # log event to find the correct Format_description_log_event from # master when it is starting and opening an existing relay log. # # Steps to reproduce: # 1) Start master and slave servers # 2) Stop slave applier thread. # 3) Write an event into binary log on master # when master disables binlog_checksum. # 4) Start slave applier thread to verify that # their is no event crc check failure. # --source include/not_group_replication_plugin.inc # Test in this file is binlog format agnostic, thus no need # to rerun them for every format. --source include/have_binlog_format_row.inc --source include/master-slave.inc --source include/rpl_connection_slave.inc --source include/stop_slave_sql.inc --source include/rpl_connection_master.inc CREATE TABLE t1 (c1 INT); --echo # --echo # Start slave applier thread to verify that --echo # their is no event crc check failure. --echo # --source include/rpl_connection_slave.inc --source include/start_slave_sql.inc --source include/rpl_connection_master.inc DROP TABLE t1; --source include/rpl_end.inc