diff options
author | Vladislav Vaintroub <wlad@montyprogram.com> | 2012-11-06 22:20:13 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@montyprogram.com> | 2012-11-06 22:20:13 +0100 |
commit | 679b8dc18b206ca297d2f49f488d0a152d679334 (patch) | |
tree | 593b08654b2f6a3170e3e9090fa9906b586bd19d /configure.cmake | |
parent | 73c8e4416582391e326c5ceebc2974fe425ec8cd (diff) | |
download | mariadb-git-679b8dc18b206ca297d2f49f488d0a152d679334.tar.gz |
MDEV-3839 : on Solaris 10, KILLing slave thread has no effect.
The reason for the error is missing definition for SIGNAL_WITH_IO_CLOSE on this platform
which now needs to always be defined, as in 5.6
On Solaris10 only, this preprocessor constant was not defined, thus code that shutdowns a socket in THD::awake was not executed, and polling thread was not interrupted.
Fix is to always define SIGNAL_WITH_IO_CLOSE, just like MySQL5.6 does.
Diffstat (limited to 'configure.cmake')
-rw-r--r-- | configure.cmake | 46 |
1 files changed, 5 insertions, 41 deletions
diff --git a/configure.cmake b/configure.cmake index 6095c588962..ad8c814a387 100644 --- a/configure.cmake +++ b/configure.cmake @@ -936,49 +936,13 @@ CHECK_CXX_SOURCE_COMPILES(" " HAVE_SOLARIS_STYLE_GETHOST) -# Use of ALARMs to wakeup on timeout on sockets -# -# This feature makes use of a mutex and is a scalability hog we -# try to avoid using. However we need support for SO_SNDTIMEO and -# SO_RCVTIMEO socket options for this to work. So we will check -# if this feature is supported by a simple TRY_RUN macro. However -# on some OS's there is support for setting those variables but -# they are silently ignored. For those OS's we will not attempt -# to use SO_SNDTIMEO and SO_RCVTIMEO even if it is said to work. -# See Bug#29093 for the problem with SO_SND/RCVTIMEO on HP/UX. -# To use alarm is simple, simply avoid setting anything. +SET(NO_ALARM 1 CACHE BOOL "No need to use alarm to implement timeout") -IF(WIN32) - SET(HAVE_SOCKET_TIMEOUT 1) -ELSEIF(CMAKE_SYSTEM MATCHES "HP-UX") - SET(HAVE_SOCKET_TIMEOUT 0) -ELSEIF(CMAKE_CROSSCOMPILING) - SET(HAVE_SOCKET_TIMEOUT 0) -ELSE() -SET(CMAKE_REQUIRED_LIBRARIES ${LIBNSL} ${LIBSOCKET}) -CHECK_C_SOURCE_RUNS( -" - #include <sys/types.h> - #include <sys/socket.h> - #include <sys/time.h> - - int main() - { - int fd = socket(AF_INET, SOCK_STREAM, 0); - struct timeval tv; - int ret= 0; - tv.tv_sec= 2; - tv.tv_usec= 0; - ret|= setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(tv)); - ret|= setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv)); - return !!ret; - } -" HAVE_SOCKET_TIMEOUT) -ENDIF() +# As a consequence of ALARMs no longer being used, thread +# notification for KILL must close the socket to wake up +# other threads. +SET(SIGNAL_WITH_VIO_CLOSE 1) -SET(NO_ALARM "${HAVE_SOCKET_TIMEOUT}" CACHE BOOL - "No need to use alarm to implement socket timeout") -SET(SIGNAL_WITH_VIO_CLOSE "${HAVE_SOCKET_TIMEOUT}") MARK_AS_ADVANCED(NO_ALARM) |