summaryrefslogtreecommitdiff
path: root/scripts
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 /scripts
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 'scripts')
-rw-r--r--scripts/Makefile.am1
-rw-r--r--scripts/mysql_config.sh7
-rw-r--r--scripts/mysql_fix_privilege_tables.sh1
-rw-r--r--scripts/mysqld_safe-watch.sh2
4 files changed, 9 insertions, 2 deletions
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index d4944962884..2b6870717ba 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -174,6 +174,7 @@ SUFFIXES = .sh
-e 's!@''MYSQLD_DEFAULT_SWITCHES''@!@MYSQLD_DEFAULT_SWITCHES@!' \
-e 's!@''MYSQL_UNIX_ADDR''@!@MYSQL_UNIX_ADDR@!' \
-e 's!@''MYSQL_TCP_PORT''@!@MYSQL_TCP_PORT@!' \
+ -e 's!@''MYSQL_TCP_PORT_DEFAULT''@!@MYSQL_TCP_PORT_DEFAULT@!' \
-e 's!@''TARGET_LINUX''@!@TARGET_LINUX@!' \
-e "s!@""CONF_COMMAND""@!@CONF_COMMAND@!" \
-e 's!@''MYSQLD_USER''@!@MYSQLD_USER@!' \
diff --git a/scripts/mysql_config.sh b/scripts/mysql_config.sh
index f094cb060b7..ab58c512aac 100644
--- a/scripts/mysql_config.sh
+++ b/scripts/mysql_config.sh
@@ -92,9 +92,14 @@ fix_path pkgincludedir include/mysql include
version='@VERSION@'
socket='@MYSQL_UNIX_ADDR@'
-port='@MYSQL_TCP_PORT@'
ldflags='@LDFLAGS@'
+if [ @MYSQL_TCP_PORT_DEFAULT@ -eq 0 ]; then
+ port=0
+else
+ port=@MYSQL_TCP_PORT@
+fi
+
# Create options
# We intentionally add a space to the beginning and end of lib strings, simplifies replace later
libs=" $ldflags -L$pkglibdir -lmysqlclient @ZLIB_DEPS@ @NON_THREADED_LIBS@"
diff --git a/scripts/mysql_fix_privilege_tables.sh b/scripts/mysql_fix_privilege_tables.sh
index a353273dc28..3b179957932 100644
--- a/scripts/mysql_fix_privilege_tables.sh
+++ b/scripts/mysql_fix_privilege_tables.sh
@@ -25,6 +25,7 @@ sql_only=0
basedir="@prefix@"
verbose=0
args=""
+# no elaborate fallback here; with no argument, it will happen in "mysql"
port=""
socket=""
database="mysql"
diff --git a/scripts/mysqld_safe-watch.sh b/scripts/mysqld_safe-watch.sh
index c837ba9a118..f853741c87b 100644
--- a/scripts/mysqld_safe-watch.sh
+++ b/scripts/mysqld_safe-watch.sh
@@ -66,7 +66,7 @@ fi
echo "Starting mysqld demon with databases from $DATADIR"
#Default communication ports
-#MYSQL_TCP_PORT=3306
+#MYSQL_TCP_PORT=@MYSQL_TCP_PORT@
if test -z "$MYSQL_UNIX_PORT"
then
MYSQL_UNIX_PORT="/tmp/mysql.sock"