Skip to content
  • Anirudh Mangipudi's avatar
    6b13a95d
    Bug #17076131 MYSQLDUMP FAILS WHEN ERR LOG ON RUNNING SERVER IS DELETED ON WINDOWS · 6b13a95d
    Anirudh Mangipudi authored
    Problem:
    As the title mentions, on windows mysqldump tool is creating the dump file 
    without the content (tables, views etc) of a database that is dumped when the 
    error log file is deleted (by the user). Similar behaviour is not happening 
    on Linux flavours. The difference is due to the difference in handling of the 
    deleted files. In Windows, the line "if (flush_logs || opt_delete_master_logs)"
    in main.c of mysqldump is returning error whereas on linux this line is passing
    
    Solution:
    The core problem is that, in Windows, the new error log file is being created but
    the old file descriptor which is associated with both stdout and stderr stream
    is not being closed by the program. So a retry logic has been implemented where
    we close the error log's file descriptor (associated open fds of stderr and
    stdout) in the first attempt and open a new file and associating it with
    stdout/stderr streams.
    6b13a95d
    Bug #17076131 MYSQLDUMP FAILS WHEN ERR LOG ON RUNNING SERVER IS DELETED ON WINDOWS
    Anirudh Mangipudi authored
    Problem:
    As the title mentions, on windows mysqldump tool is creating the dump file 
    without the content (tables, views etc) of a database that is dumped when the 
    error log file is deleted (by the user). Similar behaviour is not happening 
    on Linux flavours. The difference is due to the difference in handling of the 
    deleted files. In Windows, the line "if (flush_logs || opt_delete_master_logs)"
    in main.c of mysqldump is returning error whereas on linux this line is passing
    
    Solution:
    The core problem is that, in Windows, the new error log file is being created but
    the old file descriptor which is associated with both stdout and stderr stream
    is not being closed by the program. So a retry logic has been implemented where
    we close the error log's file descriptor (associated open fds of stderr and
    stdout) in the first attempt and open a new file and associating it with
    stdout/stderr streams.
Loading