summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMikael Ronstrom <mikael@mysql.com>2009-02-17 13:24:09 +0100
committerMikael Ronstrom <mikael@mysql.com>2009-02-17 13:24:09 +0100
commit6db314c628b103b7c4d7fc0ba4c21eda6e6a349e (patch)
tree8414a0bf16f74515368a6a4ebc7ea528e8f982a2 /scripts
parent805e8ffb9ec3ae7b9353d65f33e4eb20284876ae (diff)
parent6bd93f670271eaf2bd79bd7fa538e9baaa7dcb0f (diff)
downloadmariadb-git-6db314c628b103b7c4d7fc0ba4c21eda6e6a349e.tar.gz
Merged Performance Version 0.2.1 with latest 5.1 tree (last push 11 feb 14.01.13 2009)
Diffstat (limited to 'scripts')
-rw-r--r--scripts/make_binary_distribution.sh9
-rw-r--r--scripts/mysql_install_db.sh51
-rw-r--r--scripts/mysqld_multi.sh5
3 files changed, 61 insertions, 4 deletions
diff --git a/scripts/make_binary_distribution.sh b/scripts/make_binary_distribution.sh
index 8b191cf2cf4..f73de69f5b3 100644
--- a/scripts/make_binary_distribution.sh
+++ b/scripts/make_binary_distribution.sh
@@ -60,13 +60,16 @@ STRIP=1 # Option ignored
SILENT=0
PLATFORM=""
TMP=/tmp
+NEW_NAME="" # Final top directory and TAR package name
SUFFIX=""
+SHORT_PRODUCT_TAG="" # If don't want server suffix in package name
NDBCLUSTER="" # Option ignored
for arg do
case "$arg" in
--tmp=*) TMP=`echo "$arg" | sed -e "s;--tmp=;;"` ;;
--suffix=*) SUFFIX=`echo "$arg" | sed -e "s;--suffix=;;"` ;;
+ --short-product-tag=*) SHORT_PRODUCT_TAG=`echo "$arg" | sed -e "s;--short-product-tag=;;"` ;;
--no-strip) STRIP=0 ;;
--machine=*) machine=`echo "$arg" | sed -e "s;--machine=;;"` ;;
--platform=*) PLATFORM=`echo "$arg" | sed -e "s;--platform=;;"` ;;
@@ -113,7 +116,11 @@ case $PLATFORM in
esac
# Change the distribution to a long descriptive name
-NEW_NAME=mysql@MYSQL_SERVER_SUFFIX@-@VERSION@-$PLATFORM$SUFFIX
+if [ x"$SHORT_PRODUCT_TAG" != x"" ] ; then
+ NEW_NAME=mysql-$SHORT_PRODUCT_TAG-@VERSION@-$PLATFORM$SUFFIX
+else
+ NEW_NAME=mysql@MYSQL_SERVER_SUFFIX@-@VERSION@-$PLATFORM$SUFFIX
+fi
# ----------------------------------------------------------------------
# Define BASE, and remove the old BASE directory if any
diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh
index 5a2409eeb6f..20b7973cb4e 100644
--- a/scripts/mysql_install_db.sh
+++ b/scripts/mysql_install_db.sh
@@ -21,6 +21,7 @@
basedir=""
builddir=""
ldata="@localstatedir@"
+langdir=""
srcdir=""
args=""
@@ -106,7 +107,7 @@ parse_arguments()
# Note that the user will be passed to mysqld so that it runs
# as 'user' (crucial e.g. if log-bin=/some_other_path/
# where a chown of datadir won't help)
- user=`parse_arg "$arg"` ;;
+ user=`parse_arg "$arg"` ;;
--skip-name-resolve) ip_only=1 ;;
--verbose) verbose=1 ;; # Obsolete
--rpm) in_rpm=1 ;;
@@ -171,7 +172,20 @@ find_in_basedir()
cannot_find_file()
{
echo
- echo "FATAL ERROR: Could not find $*"
+ echo "FATAL ERROR: Could not find $1"
+
+ shift
+ if test $# -ne 0
+ then
+ echo
+ echo "The following directories were searched:"
+ echo
+ for dir in "$@"
+ do
+ echo " $dir"
+ done
+ fi
+
echo
echo "If you compiled from source, you need to run 'make install' to"
echo "copy the software into the correct location ready for operation."
@@ -210,6 +224,11 @@ then
elif test -n "$basedir"
then
print_defaults=`find_in_basedir my_print_defaults bin extra`
+ if test -z "$print_defaults"
+ then
+ cannot_find_file my_print_defaults $basedir/bin $basedir/extra
+ exit 1
+ fi
else
print_defaults="@bindir@/my_print_defaults"
fi
@@ -232,7 +251,7 @@ then
bindir="$basedir/client"
extra_bindir="$basedir/extra"
mysqld="$basedir/sql/mysqld"
- mysqld_opt="--language=$srcdir/sql/share/english"
+ langdir="$srcdir/sql/share/english"
pkgdatadir="$srcdir/scripts"
scriptdir="$srcdir/scripts"
elif test -n "$basedir"
@@ -240,7 +259,23 @@ then
bindir="$basedir/bin"
extra_bindir="$bindir"
mysqld=`find_in_basedir mysqld libexec sbin bin`
+ if test -z "$mysqld"
+ then
+ cannot_find_file mysqld $basedir/libexec $basedir/sbin $basedir/bin
+ exit 1
+ fi
+ langdir=`find_in_basedir --dir errmsg.sys share/english share/mysql/english`
+ if test -z "$langdir"
+ then
+ cannot_find_file errmsg.sys $basedir/share/english $basedir/share/mysql/english
+ exit 1
+ fi
pkgdatadir=`find_in_basedir --dir fill_help_tables.sql share share/mysql`
+ if test -z "$pkgdatadir"
+ then
+ cannot_find_file fill_help_tables.sql $basedir/share $basedir/share/mysql
+ exit 1
+ fi
scriptdir="$basedir/scripts"
else
basedir="@prefix@"
@@ -271,6 +306,16 @@ then
exit 1
fi
+if test -n "$langdir"
+then
+ if test ! -f "$langdir/errmsg.sys"
+ then
+ cannot_find_file "$langdir/errmsg.sys"
+ exit 1
+ fi
+ mysqld_opt="--language=$langdir"
+fi
+
# Try to determine the hostname
hostname=`@HOSTNAME@`
diff --git a/scripts/mysqld_multi.sh b/scripts/mysqld_multi.sh
index 3cb4665eb1c..631e1e38cc7 100644
--- a/scripts/mysqld_multi.sh
+++ b/scripts/mysqld_multi.sh
@@ -293,7 +293,12 @@ sub start_mysqlds()
@groups = &find_groups($groupids);
for ($i = 0; defined($groups[$i]); $i++)
{
+ # Defaults are made explicit parameters to server execution...
@options = defaults_for_group($groups[$i]);
+ # ...so server MUST NOT try to read again from some config file, especially
+ # as the "right" file may be unknown to the server if we are using
+ # --defaults-file=... params in here.
+ unshift(@options,"--no-defaults");
$mysqld_found= 1; # The default
$mysqld_found= 0 if (!length($mysqld));