• unknown's avatar
    BUG#25521 - optimize table, delete, show table status leads to table · e8a25c95
    unknown authored
                losing it's .MYD
    
    When OPTIMIZE TABLE is completed it attempts to rename temporary
    file to original name. This step may fail on windows when a file
    is opened. As a result data file might be deleted and optimized
    copy of file (table_name.MYD) remains.
    
    This situation is handled properly by my_delete_allow_opened, so
    use it instead of my_delete when attempting to rename a file on
    windows.
    
    No suitable test case for this bug.
    
    
    mysys/my_redel.c:
      Attempting to delete an opened file and to immediately create
      a new one with the same name may result in my_redel failure on
      windows. It may fail because file is not deleted until it is
      closed.
      
      This situation is handled properly by my_delete_allow_opened, so
      use it instead of my_delete.
    e8a25c95
my_redel.c 3.38 KB