summaryrefslogtreecommitdiff
path: root/client/mysqlshow.c
diff options
context:
space:
mode:
authortnurnberg@mysql.com/sin.intern.azundris.com <>2007-09-13 16:19:46 +0200
committertnurnberg@mysql.com/sin.intern.azundris.com <>2007-09-13 16:19:46 +0200
commit3c6ca8d6edf55764df93a831f61dc3855e82d91c (patch)
tree602e3e9d9862d8866b20f7d497d64c91d470ea4e /client/mysqlshow.c
parent4a52b5c88547a01f33b2566d4503f6eef7f082bc (diff)
downloadmariadb-git-3c6ca8d6edf55764df93a831f61dc3855e82d91c.tar.gz
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)
Diffstat (limited to 'client/mysqlshow.c')
-rw-r--r--client/mysqlshow.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/client/mysqlshow.c b/client/mysqlshow.c
index 5be01cc5a52..7b1835055f5 100644
--- a/client/mysqlshow.c
+++ b/client/mysqlshow.c
@@ -188,7 +188,13 @@ static struct my_option my_long_options[] =
{"password", 'p',
"Password to use when connecting to server. If password is not given it's asked from the tty.",
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
- {"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},
#ifdef __WIN__