• Vladislav Vaintroub's avatar
    MDEV-14115 : Do not use lpNumberOfBytesRead/Written params in · 97df230a
    Vladislav Vaintroub authored
    ReadFile/WriteFile operations.
    
    Innodb opens files with FILE_FLAG_OVERLAPPED. lpNumberOfBytesRead/Written
    are documented to be potentially inaccurate in this case,
    (possibly even if async operations complete synchronously?)
    
    The fix is to always pass NULL for the correspondng parameters,
    as recommended by  MSDN. Read the actual counts with
    GetQueuedCompletionStatus() or GetOverlappedResult().
    97df230a
os0file.cc 177 KB