Skip to content

Commit 588b033

Browse files
committed
Add error logging for aio error on Windows
1 parent 7c6037c commit 588b033

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

storage/innobase/os/os0file.cc

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7366,10 +7366,20 @@ os_aio_windows_handler(
73667366
srv_set_io_thread_op_info(orig_seg, "wait Windows aio");
73677367
}
73687368

7369+
DWORD handle_count = (DWORD)array->slots_per_segment();
7370+
HANDLE *handle_array = array->handles(segment);
73697371
pos = WaitForMultipleObjects(
7370-
(DWORD) array->slots_per_segment(),
7371-
array->handles(segment),
7372+
handle_count,
7373+
handle_array,
73727374
FALSE, INFINITE);
7375+
if (pos == WAIT_FAILED) {
7376+
DWORD last_error = GetLastError();
7377+
ib::error()
7378+
<< "WaitForMultipleObjects() failed with error "
7379+
<< last_error;
7380+
ut_error;
7381+
7382+
}
73737383
}
73747384

73757385
array->acquire();

0 commit comments

Comments
 (0)