diff options
Diffstat (limited to 'sql/mysqld.cc')
-rw-r--r-- | sql/mysqld.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc index bcf115feccc..1bb51ea8e91 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -55,7 +55,9 @@ char pstack_file_name[80]; #endif /* __linux__ */ -#if defined(HAVE_DEC_3_2_THREADS) || defined(SIGNALS_DONT_BREAK_READ) +/* We have HAVE_purify below as this speeds up the shutdown of MySQL */ + +#if defined(HAVE_DEC_3_2_THREADS) || defined(SIGNALS_DONT_BREAK_READ) || defined(HAVE_purify) && defined(__linux__) #define HAVE_CLOSE_SERVER_SOCK 1 #endif @@ -534,12 +536,14 @@ static void close_connections(void) struct timespec abstime; int error; LINT_INIT(error); + DBUG_PRINT("info",("Waiting for select_thread")); + #ifndef DONT_USE_THR_ALARM if (pthread_kill(select_thread,THR_CLIENT_ALARM)) break; // allready dead #endif set_timespec(abstime, 2); - for (uint tmp=0 ; tmp < 10 ; tmp++) + for (uint tmp=0 ; tmp < 10 && select_thread_in_use; tmp++) { error=pthread_cond_timedwait(&COND_thread_count,&LOCK_thread_count, &abstime); @@ -700,8 +704,8 @@ static void close_server_sock() VOID(shutdown(tmp_sock,2)); #if defined(__NETWARE__) /* - The following code is disabled for normal systems as it causes MySQL - AIX 4.3 during shutdown (not tested, but likely) + The following code is disabled for normal systems as it may cause MySQL + to hang on AIX 4.3 during shutdown */ DBUG_PRINT("info",("calling closesocket on unix/IP socket")); VOID(closesocket(tmp_sock)); |