summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorMagne Mahre <magne.mahre@sun.com>2010-02-14 19:12:58 +0100
committerMagne Mahre <magne.mahre@sun.com>2010-02-14 19:12:58 +0100
commit2d4687d03b1a25b68de197837b6e51524d3a5b8a (patch)
tree9d5bb9f598d68ef5e7477a4d5672b2ed3210fac2 /configure.in
parent87c6bf3fc8edc185569702915c10b4241dba7293 (diff)
downloadmariadb-git-2d4687d03b1a25b68de197837b6e51524d3a5b8a.tar.gz
Bug#48929 Error in Accept() if using many file descriptors
In POSIX systems, the file descriptor set used in the select(2) system call is represented by a bit vector of size FD_SETSIZE. When select(2) is used on file/socket descriptors with a value that is beyond this size, unpredictable errors may occur. In this case, the error happens when there are a large number of tables that need repair. These tables are opened before the sockets for incoming connections are acquired, resulting in these sockets getting descriptor id which is higher than FD_SETSIZE. Replacing the call to select(2) with poll(2) fixes the problem, as poll takes an array of the wanted descriptors, instead of a bit vector. MS Windows has a different implementation of 'select', and is not affected by this bug. configure.in: Added a test for the <poll.h> file sql/mysqld.cc: Restructured some of the code to reduce the number of #ifdef's. Removed some HP/UX 10-specific code.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index 9361052e2d9..9776fc12fe6 100644
--- a/configure.in
+++ b/configure.in
@@ -839,7 +839,7 @@ AC_HEADER_DIRENT
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(fcntl.h fenv.h float.h floatingpoint.h ieeefp.h limits.h \
- memory.h pwd.h select.h \
+ memory.h pwd.h select.h poll.h \
stdlib.h stddef.h \
strings.h string.h synch.h sys/mman.h sys/socket.h netinet/in.h arpa/inet.h \
sys/timeb.h sys/types.h sys/un.h sys/vadvise.h sys/wait.h term.h \