[Commits] Rev 3476: MDEV-3839 : on Solaris 10, KILLing slave thread has no effect. in file:///H:/bzr/10.0-serg/

Vladislav Vaintroub wlad at montyprogram.com
Tue Nov 6 23:21:06 EET 2012


At file:///H:/bzr/10.0-serg/

------------------------------------------------------------
revno: 3476
revision-id: wlad at montyprogram.com-20121106212013-iaojf2m619t5ya37
parent: sergii at pisem.net-20121105114017-is3ogac6l5k8345j
committer: Vladislav Vaintroub <wlad at montyprogram.com>
branch nick: 10.0-serg
timestamp: Tue 2012-11-06 22:20:13 +0100
message:
  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.
-------------- next part --------------
=== modified file 'configure.cmake'
--- a/configure.cmake	2012-10-19 18:38:59 +0000
+++ b/configure.cmake	2012-11-06 21:20:13 +0000
@@ -936,49 +936,13 @@
   "
   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.
-
-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()
-
-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}")
+SET(NO_ALARM 1 CACHE BOOL  "No need to use alarm to implement timeout")
+
+# 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)
+
 MARK_AS_ADVANCED(NO_ALARM)
 
 



More information about the commits mailing list