summaryrefslogtreecommitdiff
path: root/netware
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 /netware
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 'netware')
-rw-r--r--netware/mysql_test_run.c3
-rw-r--r--netware/mysqld_safe.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/netware/mysql_test_run.c b/netware/mysql_test_run.c
index 6bab2f0149c..a62de9013f9 100644
--- a/netware/mysql_test_run.c
+++ b/netware/mysql_test_run.c
@@ -1170,7 +1170,8 @@ void setup(char *file)
setenv("MYSQL_BINLOG", file_path, 1);
setenv("MASTER_MYPORT", "9306", 1);
setenv("SLAVE_MYPORT", "9307", 1);
- setenv("MYSQL_TCP_PORT", "3306", 1);
+ snprintf(file_path, PATH_MAX*2, "%d", MYSQL_PORT);
+ setenv("MYSQL_TCP_PORT", file_path, 1);
snprintf(file_path, PATH_MAX*2, "%s/mysql_client_test --no-defaults --testcase--user=root --port=%u ", bin_dir, master_port);
setenv("MYSQL_CLIENT_TEST",file_path,1);
snprintf(file_path, PATH_MAX*2, "%s/mysql --no-defaults --user=root --port=%u ", bin_dir, master_port);
diff --git a/netware/mysqld_safe.c b/netware/mysqld_safe.c
index 9db8a441ca3..00e7d1bcd51 100644
--- a/netware/mysqld_safe.c
+++ b/netware/mysqld_safe.c
@@ -189,7 +189,7 @@ void start_defaults(int argc, char *argv[])
snprintf(address, PATH_MAX, "0.0.0.0");
// port
- snprintf(port, PATH_MAX, "3306");
+ snprintf(port, PATH_MAX, "%d", MYSQL_PORT);
// default option
default_option[0]= NULL;