diff options
author | unknown <petr@mysql.com> | 2006-02-21 15:32:52 +0300 |
---|---|---|
committer | unknown <petr@mysql.com> | 2006-02-21 15:32:52 +0300 |
commit | 8a1dd17b5ed0330030a66f66f2e9400173c078cf (patch) | |
tree | 8d1c46c884fdd64add5b3645abb86677a12efdae | |
parent | 187aab97b6936ed88b5021de0bc0ae342ac991c8 (diff) | |
download | mariadb-git-8a1dd17b5ed0330030a66f66f2e9400173c078cf.tar.gz |
Fix for Bug #12674 "Instance Manager: IM doesn't handle client
connections correctly".
Recommit with the max timeout value in sync with the comment.
server-tools/instance-manager/options.cc:
add new option to set wait timeout
server-tools/instance-manager/priv.h:
add a const for max wait timeout
-rw-r--r-- | server-tools/instance-manager/options.cc | 6 | ||||
-rw-r--r-- | server-tools/instance-manager/priv.h | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/server-tools/instance-manager/options.cc b/server-tools/instance-manager/options.cc index 8119e8fc0ea..e7d366e7457 100644 --- a/server-tools/instance-manager/options.cc +++ b/server-tools/instance-manager/options.cc @@ -79,6 +79,7 @@ enum options { #endif OPT_MONITORING_INTERVAL, OPT_PORT, + OPT_WAIT_TIMEOUT, OPT_BIND_ADDRESS }; @@ -151,6 +152,11 @@ static struct my_option my_long_options[] = { "version", 'V', "Output version information and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0 }, + { "wait-timeout", OPT_WAIT_TIMEOUT, "The number of seconds IM waits " + "for activity on a connection before closing it.", + (gptr *) &net_read_timeout, (gptr *) &net_read_timeout, 0, GET_ULONG, + REQUIRED_ARG, NET_WAIT_TIMEOUT, 1, LONG_TIMEOUT, 0, 1, 0 }, + { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0 } }; diff --git a/server-tools/instance-manager/priv.h b/server-tools/instance-manager/priv.h index af6d2837933..52d7aa1d23d 100644 --- a/server-tools/instance-manager/priv.h +++ b/server-tools/instance-manager/priv.h @@ -28,6 +28,8 @@ #define SERVER_DEFAULT_PORT 3306 #define DEFAULT_MONITORING_INTERVAL 20 #define DEFAULT_PORT 2273 +/* three-week timeout should be enough */ +#define LONG_TIMEOUT ((ulong) 3600L*24L*21L) /* the pid of the manager process (of the signal thread on the LinuxThreads) */ extern pid_t manager_pid; |