Below is the list of changes that have just been committed into a local
5.0 repository of monty. When monty does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.1842 05/04/16 11:40:41 monty@stripped +1 -0
Set bindir, datadir & others if --basedir is given. This ensures that one only has
to set basedir in [mysqld] group when moving a binary installation to a not default
polace
Use for now safe_mysqld by default. (unless use-manager is set in the [mysql.server]
option in my.cnf)
Search first for defaults files in basedir and then in datadir (like mysqld_safe)
support-files/mysql.server.sh
1.44 05/04/16 11:40:35 monty@stripped +23 -9
Set bindir, datadir & others if --basedir is given. This ensures that one only has
to set basedir in [mysqld] group when moving a binary installation to a not default polace
Use for now safe_mysqld by default. (unless use-manager is set in the [mysql.server]
option in my.cnf)
Search first for defaults files in basedir and then in datadir (like mysqld_safe)
I removed the test for localstatedir as default.c doesn't anymore read defaults files
from localstatedir
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: monty
# Host: mishka.local
# Root: /home/my/mysql-5.0
--- 1.43/support-files/mysql.server.sh Sat Apr 16 10:51:39 2005
+++ 1.44/support-files/mysql.server.sh Sat Apr 16 11:40:35 2005
@@ -49,6 +49,7 @@
# Set some defaults
pid_file=
server_pid_file=
+use_mysqld_safe=1
user=@MYSQLD_USER@
if test -z "$basedir"
then
@@ -59,6 +60,7 @@
libexecdir=@libexecdir@
else
bindir="$basedir/bin"
+ datadir="$basedir/data"
sbindir="$basedir/bin"
libexecdir="$basedir/bin"
fi
@@ -94,10 +96,17 @@
parse_server_arguments() {
for arg do
case "$arg" in
- --basedir=*) basedir=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
+ --basedir=*) basedir=`echo "$arg" | sed -e 's/^[^=]*=//'`
+ bindir="$basedir/bin"
+ datadir="$basedir/data"
+ sbindir="$basedir/bin"
+ libexecdir="$basedir/bin"
+ ;;
--datadir=*) datadir=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
--user=*) user=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
--pid-file=*) server_pid_file=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
+ --use-mysqld_safe) use_mysqld_safe=1;;
+ --use-manager) use_mysqld_safe=0;;
esac
done
}
@@ -178,14 +187,19 @@
fi
#
-# Test if someone changed datadir; In this case we should also read the
-# default arguments from this directory
+# Read defaults file from 'basedir'. If there is no defaults file there
+# check if it's in the old (depricated) place (datadir) and read it from there
#
extra_args=""
-if test "$datadir" != "@localstatedir@"
+if test -r "$basedir/my.cnf"
then
- extra_args="-e $datadir/my.cnf"
+ extra_args="-e $basedir/my.cnf"
+else
+ if test -r "$datadir/my.cnf"
+ then
+ extra_args="-e $datadir/my.cnf"
+ fi
fi
parse_server_arguments `$print_defaults $extra_args mysqld server mysql_server
mysql.server`
@@ -231,11 +245,11 @@
manager=$sbindir/mysqlmanager
fi
- if test -x $manager
+ echo $echo_n "Starting MySQL"
+ if test -x $manager -a "$use_mysqld_safe" = "0"
then
# Give extra arguments to mysqld with the my.cnf file. This script may
# be overwritten at next upgrade.
- echo $echo_n "Starting MySQL"
$manager --user=$user --pid-file=$pid_file >/dev/null 2>&1 &
wait_for_pid created
@@ -246,8 +260,8 @@
fi
elif test -x $bindir/mysqld_safe
then
- # Give extra arguments to mysqld with the my.cnf file. This script may be
overwritten at next upgrade.
- echo $echo_n "Starting MySQL"
+ # Give extra arguments to mysqld with the my.cnf file. This script
+ # may be overwritten at next upgrade.
pid_file=$server_pid_file
$bindir/mysqld_safe --datadir=$datadir --pid-file=$server_pid_file >/dev/null
2>&1 &
wait_for_pid created
| Thread |
|---|
| • bk commit into 5.0 tree (monty:1.1842) | monty | 16 Apr |