• Luis Soares's avatar
    BUG#55263: assert in check_binlog_magic · f17cc604
    Luis Soares authored
    The procedure for setting up a fake binary log, by changing the
    relay log files manually, is run twice when we issue mtr with
    --repeat=2. However, when setting it up for the second time,
    neither the sql thread is reset nor the server is restarted. This
    means that previous stale relay log IO_CACHE metadata - from 
    first run - is left around. As a consequence, when the test is 
    run for the second time, the IO_CACHE for the relay log has 
    position in file different than zero, triggering the assertion.
                
    We fix this by deploying a call to my_b_seek before calling
    check_binlog_magic in next_event. This prevents the server 
    from asserting, in the cases that the SQL thread was reads
    from a hot log (relay.NNNNN), then is stopped, then is restarted 
    from a previous cold log (relay.MMMMM), and then it reaches 
    the hot log relay.NNNNN again, in which case, the read 
    coordinates are not set to zero, but to the old values.
    
    Additionally, some comments to the source code were added.
    f17cc604
rpl_rli.h 13.5 KB