• Sujatha's avatar
    MDEV-8134: The relay-log is not flushed after the slave-relay-log.999999 showed · eb75e870
    Sujatha authored
    Problem:
    ========
    Auto purge of relaylogs stops when relay-log-file is
    'slave-relay-log.999999' and slave_parallel_threads is enabled.
    
    Analysis:
    =========
    The problem is that in Relay_log_info::inc_group_relay_log_pos() function,
    when two log names are compared via strcmp() function, it gives correct
    result, when log name sequence numbers are of same digits(6 digits), But
    when the number goes to 7 digits, a 999999 compares greater than
    1000000, which is wrong, hence the bug.
    
    Fix:
    ====
    Extract the numeric extension part of the file name, convert it into
    unsigned long and compare.
    
    Thanks to David Zhao for the contribution.
    eb75e870
rpl_parallel.cc 90.8 KB