win_handle_read should always call GetLastError on error

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • WT2.9.0
    • Affects Version/s: WT2.8.0
    • Component/s: None
    • None
    • Platforms 13 (04/22/16)
    • None

      Check nr in the code below is POSIX read api semantics but is wrong for Windows. This causes the WIndows code to lose error information if read fails.

                      if (!ReadFile(fh->filehandle, addr, chunk, &nr, &overlapped))
                              WT_RET_MSG(session,
                                 nr == 0 ? WT_ERROR : __wt_getlasterror(),
                                  "%s: handle-read: ReadFile: failed to read %lu "
                                  "bytes at offset %" PRIuMAX,
      

            Assignee:
            Mark Benvenuto
            Reporter:
            Mark Benvenuto
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: