This is a fix for a bug in 3.23 -> 4.0 replication: Exec_master_log_pos is always
too big by 6 bytes. So I add code to substract 6 bytes if the master is 3.23. This is not perfect (because it won't work if the slave I/O thread has not noticed yet that the master is 3.23), but as long as the slave I/O thread starts Exec_master_log_pos will be ok. It must be merged to 4.1 but not to 5.0 (or it can be, because of #if MYSQL_VERSION_ID), because 5.0 already works if the master is 3.23 (and in a more natural way: in 5.0 we store the end_log_pos in the binlog and relay log). I had to move functions from slave.h to slave.cc to satisfy gcc. sql/log_event.cc: make the event's length 6 bytes shorter if the master is 3.23 sql/slave.cc: Moving several st_relay_log_info methods out of the declaration of the struct, because gcc complained that 'mi' was not declared. Substracting 6 bytes from the event's length in inc_pos() if the master is 3.23. sql/slave.h: moving several methods out of the declaration of st_relay_log_info. Removing 'inline', let's have the compiler decide.
Showing
Please register or sign in to comment