Commit 68c15eee authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

MDEV-19643 : Fix semisync on Windows

Use correct preprocessor definition.
Do not compare socket value with FD_SETSIZE
parent 192aa295
...@@ -211,7 +211,7 @@ class Select_socket_listener ...@@ -211,7 +211,7 @@ class Select_socket_listener
{ {
my_socket socket_id= slave->sock_fd(); my_socket socket_id= slave->sock_fd();
m_max_fd= (socket_id > m_max_fd ? socket_id : m_max_fd); m_max_fd= (socket_id > m_max_fd ? socket_id : m_max_fd);
#ifndef WINDOWS #ifndef _WIN32
if (socket_id > FD_SETSIZE) if (socket_id > FD_SETSIZE)
{ {
sql_print_error("Semisync slave socket fd is %u. " sql_print_error("Semisync slave socket fd is %u. "
...@@ -219,7 +219,7 @@ class Select_socket_listener ...@@ -219,7 +219,7 @@ class Select_socket_listener
"greater than %u (FD_SETSIZE).", socket_id, FD_SETSIZE); "greater than %u (FD_SETSIZE).", socket_id, FD_SETSIZE);
return 0; return 0;
} }
#endif //WINDOWS #endif //_WIN32
FD_SET(socket_id, &m_init_fds); FD_SET(socket_id, &m_init_fds);
fds_index++; fds_index++;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment