• Libing Song's avatar
    Bug#17402313 DUMP THREAD SENDS SOME EVENTS MORE THAN ONCE · d5fdf9ef
    Libing Song authored
    Dump thread may encounter an error when reading events from the active binlog
    file. However the errors may be temporary, so dump thread will try to read
    the event again. But dump thread seeked to an wrong position, it caused some
    events was sent twice.
    
    To fix the bug, prev_pos is defined out the while loop and is set the correct
    position after reading every event correctly.
    
    This patch also make binlog_can_be_corrupted more accurate, only the binlogs
    not closed normally are marked binlog_can_be_corrupted.
    
    Finally, two warnings are added when dump threads encounter the temporary
    errors.
    d5fdf9ef
log_event.cc 321 KB