• Luis Soares's avatar
    BUG#50474: rpl_slave_load_remove_tmpfile failed on windows debug · a3c83774
    Luis Soares authored
    enabled binary
    
    The test case injects an error in the server by deleting the
    temporary file that it uses during the load data statement
    execution. The error consisted of closing, deleting and setting
    the file descriptor to -1 right before calling mysql_file_write.
    
    Although, this error injection seems to work OK in Unix like
    environments, in Windows, this would cause the server to hit an
    assertion in 'my_get_open_flags':
    
      DBUG_ASSERT(fd >= MY_FILE_MIN && fd < (int)my_file_limit)
    
    We fix this by changing the error injection to just call the
    macro my_delete_allow_opened, instead of the close + delete + set
    fd=-1. The macro deletes the file and is platform
    independent. Additionally, this required some changes to how the
    assertion is handled in the test case to make it cope with this
    change.
    a3c83774
rpl_slave_load_remove_tmpfile.result 530 Bytes