mirror of
https://github.com/MariaDB/server.git
synced 2025-01-21 22:34:18 +01:00
5578506302
into mysql.com:/home/kent/bk/tmp/mysql-5.1-build BitKeeper/etc/ignore: auto-union BitKeeper/deleted/.del-comp_err.vcproj~45c167ae5ddd5a96: Auto merged BitKeeper/deleted/.del-gen_lex_hash.vcproj~544be6b6: Auto merged BitKeeper/deleted/.del-heap.vcproj~4382203ba03f4038: Auto merged BitKeeper/deleted/.del-myTest.vcproj~dba5adc4fad3c06: Auto merged BitKeeper/deleted/.del-my_print_defaults.vcproj~c8aa2bd86e13c3f9: Auto merged BitKeeper/deleted/.del-myisam_ftdump.vcproj~409c19b0274b7f8e: Auto merged BitKeeper/deleted/.del-myisamchk.vcproj~982ebe5673e58fb6: Auto merged BitKeeper/deleted/.del-myisamlog.vcproj~daa6596ea386e5a7: Auto merged BitKeeper/deleted/.del-myisampack.vcproj~3f7d4ec0cb56a9a0: Auto merged BitKeeper/deleted/.del-mysql.vcproj~f7bfe13a8836eea0: Auto merged BitKeeper/deleted/.del-mysql_client_test.vcproj~22188dcd372bc9de: Auto merged BitKeeper/deleted/.del-mysql_upgrade.vcproj~54815b7265120589: Auto merged BitKeeper/deleted/.del-mysqladmin.vcproj~178fa55cba442d50: Auto merged BitKeeper/deleted/.del-mysqlbinlog.vcproj~b2a5b1868f5d6596: Auto merged BitKeeper/deleted/.del-mysqlcheck.vcproj~7022581c8b8a7ea2: Auto merged BitKeeper/deleted/.del-mysqlclient.vcproj~e78a73e31368a44a: Auto merged BitKeeper/deleted/.del-mysqlimport.vcproj~5a30228ef641c081: Auto merged BitKeeper/deleted/.del-mysqlshow.vcproj~797d4fa322faa148: Auto merged BitKeeper/deleted/.del-mysqltest.vcproj~21878840704179ef: Auto merged BitKeeper/deleted/.del-perror.vcproj~86ad9dc660a048ad: Auto merged BitKeeper/deleted/.del-regex.vcproj~9dea9caafa801b26: Auto merged BitKeeper/deleted/.del-replace.vcproj~9620b1ced86e527a: Auto merged BitKeeper/deleted/.del-strings.vcproj~6d1126ae59e4bf82: Auto merged BitKeeper/deleted/.del-test1.vcproj~c474b4614c67e2d2: Auto merged BitKeeper/deleted/.del-test_libmysqld.vcproj~fb301d42d5c4e6f4: Auto merged BitKeeper/deleted/.del-thr_test.vcproj~fc0e15c1e6880160: Auto merged BitKeeper/deleted/.del-vio.vcproj~b7c21b4e2d6a9b85: Auto merged BitKeeper/deleted/.del-zlib.vcproj~9b1a681d56dae190: Auto merged extra/yassl/taocrypt/taocrypt.vcproj: Auto merged extra/yassl/yassl.vcproj: Auto merged mysql-test/mysql-test-run.pl: Auto merged mysql-test/r/delayed.result: Auto merged mysql-test/r/loaddata.result: Auto merged mysql-test/r/merge.result: Auto merged mysql-test/t/delayed.test: Auto merged mysql-test/t/init_connect.test: Auto merged mysql-test/t/loaddata.test: Auto merged mysql-test/t/merge.test: Auto merged netware/Makefile.am: Auto merged scripts/make_binary_distribution.sh: Auto merged sql/item_cmpfunc.cc: Auto merged sql/mysql_priv.h: Auto merged storage/ndb/src/cw/cpcc-win32/C++/CPC_GUI.vcproj: Auto merged mysql-test/install_test_db.sh: SCCS merged
115 lines
2.6 KiB
Bash
115 lines
2.6 KiB
Bash
#!/bin/sh
|
|
# Copyright (C) 1997-2006 MySQL AB
|
|
#
|
|
# This program is free software; you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation; version 2 of the License.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program; if not, write to the Free Software
|
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
# This scripts creates the privilege tables db, host, user, tables_priv,
|
|
# columns_priv in the mysql database, as well as the func table.
|
|
|
|
if [ x$1 = x"--bin" ]; then
|
|
shift 1
|
|
BINARY_DIST=1
|
|
|
|
bindir=../bin
|
|
scriptdir=bin
|
|
libexecdir=../libexec
|
|
|
|
# Check if it's a binary distribution or a 'make install'
|
|
if test -x ../libexec/mysqld
|
|
then
|
|
execdir=../libexec
|
|
elif test -x ../../sbin/mysqld # RPM installation
|
|
then
|
|
execdir=../../sbin
|
|
bindir=../../bin
|
|
scriptdir=../bin
|
|
libexecdir=../../libexec
|
|
else
|
|
execdir=../bin
|
|
fi
|
|
fix_bin=mysql-test
|
|
else
|
|
execdir=../sql
|
|
bindir=../client
|
|
fix_bin=.
|
|
scriptdir=scripts
|
|
libexecdir=../libexec
|
|
fi
|
|
|
|
vardir=var
|
|
logdir=$vardir/log
|
|
if [ x$1 = x"-slave" ]
|
|
then
|
|
shift 1
|
|
data=var/slave-data
|
|
else
|
|
if [ x$1 = x"-1" ]
|
|
then
|
|
data=var/master-data1
|
|
else
|
|
data=var/master-data
|
|
fi
|
|
fi
|
|
ldata=$fix_bin/$data
|
|
|
|
mdata=$data/mysql
|
|
EXTRA_ARG=""
|
|
|
|
mysqld=
|
|
if test -x $execdir/mysqld
|
|
then
|
|
mysqld=$execdir/mysqld
|
|
else
|
|
if test ! -x $libexecdir/mysqld
|
|
then
|
|
echo "mysqld is missing - looked in $execdir and in $libexecdir"
|
|
exit 1
|
|
else
|
|
mysqld=$libexecdir/mysqld
|
|
fi
|
|
fi
|
|
|
|
# On IRIX hostname is in /usr/bsd so add this to the path
|
|
PATH=$PATH:/usr/bsd
|
|
hostname=`hostname` # Install this too in the user table
|
|
hostname="$hostname%" # Fix if not fully qualified hostname
|
|
|
|
|
|
#create the directories
|
|
[ -d $vardir ] || mkdir $vardir
|
|
[ -d $logdir ] || mkdir $logdir
|
|
|
|
# Create database directories mysql & test
|
|
if [ -d $data ] ; then rm -rf $data ; fi
|
|
mkdir $data $data/mysql $data/test
|
|
|
|
#for error messages
|
|
if [ x$BINARY_DIST = x1 ] ; then
|
|
basedir=..
|
|
else
|
|
basedir=.
|
|
EXTRA_ARG="--windows"
|
|
fi
|
|
|
|
INSTALL_CMD="$scriptdir/mysql_install_db --no-defaults $EXTRA_ARG --basedir=$basedir --datadir=mysql-test/$ldata --srcdir=."
|
|
echo "running $INSTALL_CMD"
|
|
|
|
cd ..
|
|
if $INSTALL_CMD
|
|
then
|
|
exit 0
|
|
else
|
|
echo "Error executing mysqld --bootstrap"
|
|
exit 1
|
|
fi
|