• guilhem@mysql.com's avatar
    This is a fix for a bug in 3.23 -> 4.0 replication: Exec_master_log_pos is always · b5ffdec2
    guilhem@mysql.com authored
    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.
    b5ffdec2
slave.cc 109 KB