• Luis Soares's avatar
    BUG#59444: rpl_row_show_relaylog_events fails on daily-5.5 test runs · 0ef30fe7
    Luis Soares authored
    The test started failing on the same day patch for BUG 49978 was
    pushed. BUG 49978 changed part of the replication testing
    infrastructure in mysql-test-run. This caused the test to fail
    sporadically with result differences on relay log file
    names. When the test fails the relay-log filenames are shifted by
    one, eg:
    
    -show relaylog events in 'slave-relay-bin.000002' from <binlog_start>;
    +show relaylog events in 'slave-relay-bin.000003' from <binlog_start>;
    
    The problem was caused by a bad cleanup when using the include
    files:
    
      - include/setup_fake_relay_log.inc
      - include/cleanup_fake_relay_log.inc
    
    Which would leave a spurious relay-log file around (not listed in
    slave-relay-bin.index), causing the server to shift the name of
    the relay logs by one, even if cleaning up with RESET SLAVE.
    
    We fix this by removing the relay-log file when it is not needed
    anymore, ie at setup time and after recreating the fake relay-log
    index.
    
    Additionally, to make the affected test more resilient, we
    deployed a call to rpl_reset.inc (which resets both master and
    slave, including log files) before actually running the test
    case.
    
    Finally, appart from the reported bug, we also fix: (a) an
    unrelated issue with the failing test itself - in some cases, the
    test was not setting the log file name to use when it should; 
    (b) one typo.
    
    mysql-test/extra/rpl_tests/rpl_show_relaylog_events.inc:
      Added call to rpl_reset.inc.
      Deployed missing instructions to get the binlog file name 
      before including show_relaylog/binlog_events.inc
    0ef30fe7
rpl_row_show_relaylog_events.result 13.5 KB