• Luis Soares's avatar
    BUG#47639: The rpl_binlog_corruption test fails on Windows · d8bd11e5
    Luis Soares authored
    The test case rpl_binlog_corruption fails on windows because when
    adding a line to the binary log index file it gets terminated
    with a CR+LF (which btw, is the normal case in windows, but not on
    Unixes - LF). This causes mismatch between the relay log names,
    causing mysqld to report that it cannot find the log file.
    
    We fix this by creating the instrumented index file through
    mysql, ie, using SELECT ... INTO DUMPFILE ..., as opposed on
    relying on ultimatly OS commands like: -- echo "..." >
    index. These changes go into the file and make the procedure
    platform independent:
    
      include/setup_fake_relay_log.inc
    
    Side note: when using SELECT ... INTO DUMPFILE ..., one needs to
    check if mysqld is running with secure_file_priv. If it is, we do
    it in two steps: 1. create the file on the allowed location;
    2. move it to the datadir. If it is not, then we just create the
    file directly on the datadir (so previous step 2. is not needed).
    d8bd11e5
setup_fake_relay_log.inc 3.11 KB