From 3c6ca8d6edf55764df93a831f61dc3855e82d91c Mon Sep 17 00:00:00 2001 From: "tnurnberg@mysql.com/sin.intern.azundris.com" <> Date: Thu, 13 Sep 2007 16:19:46 +0200 Subject: Bug #15327: configure: --with-tcp-port option being partially ignored make sure that if builder configured with a non-standard (!= 3306) default TCP port that value actually gets used throughout. if they didn't configure a value, assume "use a sensible default", which will be read from /etc/services or, failing that, from the factory default. That makes the order of preference - command-line option - my.cnf, where applicable - $MYSQL_TCP_PORT environment variable - /etc/services (unless configured --with-tcp-port) - default port (--with-tcp-port=... or factory default) --- client/mysqlcheck.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'client/mysqlcheck.c') diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c index b69e9201a28..8205a83fdf4 100644 --- a/client/mysqlcheck.c +++ b/client/mysqlcheck.c @@ -123,7 +123,13 @@ static struct my_option my_long_options[] = {"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, #endif - {"port", 'P', "Port number to use for connection.", (gptr*) &opt_mysql_port, + {"port", 'P', "Port number to use for connection or 0 for default to, in " + "order of preference, my.cnf, $MYSQL_TCP_PORT, " +#if MYSQL_PORT_DEFAULT == 0 + "/etc/services, " +#endif + "built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").", + (gptr*) &opt_mysql_port, (gptr*) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe,memory).", -- cgit v1.2.1