From 4ffcfe7c2a8a977c0b4a1f044bf9384260967a27 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Sat, 4 Sep 2021 18:52:10 +0200 Subject: [PATCH] MDEV-26538 Incorrect error condition check for ReadFile (named pipes) --- sql/threadpool_winsockets.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/threadpool_winsockets.cc b/sql/threadpool_winsockets.cc index 6b4758a451f..41167781283 100644 --- a/sql/threadpool_winsockets.cc +++ b/sql/threadpool_winsockets.cc @@ -201,7 +201,7 @@ DWORD win_aiosocket::begin_read() else { /* Do async read (named pipe) */ - if (ReadFile(m_handle, buf.buf, buf.len, 0, &m_overlapped)) + if (!ReadFile(m_handle, buf.buf, buf.len, 0, &m_overlapped)) err= GetLastError(); }