mirror of
https://github.com/MariaDB/server.git
synced 2025-07-04 01:23:45 +03:00
fix make distcheck in a different way
scripts/mysql_install_db.sh: apply different patch for make distcheck failure
This commit is contained in:
@ -19,6 +19,7 @@
|
|||||||
# All unrecognized arguments to this script are passed to mysqld.
|
# All unrecognized arguments to this script are passed to mysqld.
|
||||||
|
|
||||||
basedir=""
|
basedir=""
|
||||||
|
builddir=""
|
||||||
ldata="@localstatedir@"
|
ldata="@localstatedir@"
|
||||||
srcdir=""
|
srcdir=""
|
||||||
|
|
||||||
@ -37,6 +38,9 @@ usage()
|
|||||||
cat <<EOF
|
cat <<EOF
|
||||||
Usage: $0 [OPTIONS]
|
Usage: $0 [OPTIONS]
|
||||||
--basedir=path The path to the MySQL installation directory.
|
--basedir=path The path to the MySQL installation directory.
|
||||||
|
--builddir=path If using --srcdir with out-of-directory builds, you
|
||||||
|
will need to set this to the location of the build
|
||||||
|
directory where built files reside.
|
||||||
--datadir=path The path to the MySQL data directory.
|
--datadir=path The path to the MySQL data directory.
|
||||||
--force Causes mysql_install_db to run even if DNS does not
|
--force Causes mysql_install_db to run even if DNS does not
|
||||||
work. In that case, grant table entries that normally
|
work. In that case, grant table entries that normally
|
||||||
@ -95,6 +99,7 @@ parse_arguments()
|
|||||||
case "$arg" in
|
case "$arg" in
|
||||||
--force) force=1 ;;
|
--force) force=1 ;;
|
||||||
--basedir=*) basedir=`parse_arg "$arg"` ;;
|
--basedir=*) basedir=`parse_arg "$arg"` ;;
|
||||||
|
--builddir=*) builddir=`parse_arg "$arg"` ;;
|
||||||
--srcdir=*) srcdir=`parse_arg "$arg"` ;;
|
--srcdir=*) srcdir=`parse_arg "$arg"` ;;
|
||||||
--ldata=*|--datadir=*) ldata=`parse_arg "$arg"` ;;
|
--ldata=*|--datadir=*) ldata=`parse_arg "$arg"` ;;
|
||||||
--user=*)
|
--user=*)
|
||||||
@ -189,12 +194,21 @@ parse_arguments PICK-ARGS-FROM-ARGV "$@"
|
|||||||
#
|
#
|
||||||
# or default to compiled-in locations.
|
# or default to compiled-in locations.
|
||||||
#
|
#
|
||||||
if test -n "$basedir"
|
if test -n "$srcdir" && test -n "$basedir"
|
||||||
|
then
|
||||||
|
echo "ERROR: Specify either --basedir or --srcdir, not both."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if test -n "$srcdir"
|
||||||
|
then
|
||||||
|
if test -z "$builddir"
|
||||||
|
then
|
||||||
|
builddir="$srcdir"
|
||||||
|
fi
|
||||||
|
print_defaults="$builddir/extra/my_print_defaults"
|
||||||
|
elif test -n "$basedir"
|
||||||
then
|
then
|
||||||
print_defaults=`find_in_basedir my_print_defaults bin extra`
|
print_defaults=`find_in_basedir my_print_defaults bin extra`
|
||||||
elif test -n "$srcdir"
|
|
||||||
then
|
|
||||||
print_defaults="$srcdir/extra/my_print_defaults"
|
|
||||||
else
|
else
|
||||||
print_defaults="@bindir@/my_print_defaults"
|
print_defaults="@bindir@/my_print_defaults"
|
||||||
fi
|
fi
|
||||||
@ -211,19 +225,22 @@ parse_arguments `$print_defaults $defaults mysqld mysql_install_db`
|
|||||||
parse_arguments PICK-ARGS-FROM-ARGV "$@"
|
parse_arguments PICK-ARGS-FROM-ARGV "$@"
|
||||||
|
|
||||||
# Configure paths to support files
|
# Configure paths to support files
|
||||||
if test -n "$basedir"
|
if test -n "$srcdir"
|
||||||
|
then
|
||||||
|
basedir="$builddir"
|
||||||
|
bindir="$basedir/client"
|
||||||
|
extra_bindir="$basedir/extra"
|
||||||
|
mysqld="$basedir/sql/mysqld"
|
||||||
|
mysqld_opt="--language=$srcdir/sql/share/english"
|
||||||
|
pkgdatadir="$srcdir/scripts"
|
||||||
|
scriptdir="$srcdir/scripts"
|
||||||
|
elif test -n "$basedir"
|
||||||
then
|
then
|
||||||
bindir="$basedir/bin"
|
bindir="$basedir/bin"
|
||||||
extra_bindir="$bindir"
|
extra_bindir="$bindir"
|
||||||
mysqld=`find_in_basedir mysqld libexec sbin bin sql`
|
mysqld=`find_in_basedir mysqld libexec sbin bin`
|
||||||
pkgdatadir=`find_in_basedir --dir fill_help_tables.sql share share/mysql`
|
pkgdatadir=`find_in_basedir --dir fill_help_tables.sql share share/mysql`
|
||||||
scriptdir="$basedir/scripts"
|
scriptdir="$basedir/scripts"
|
||||||
elif test -n "$srcdir"
|
|
||||||
then
|
|
||||||
basedir="$srcdir"
|
|
||||||
bindir="$srcdir/client"
|
|
||||||
extra_bindir="$srcdir/extra"
|
|
||||||
mysqld="$srcdir/sql/mysqld"
|
|
||||||
else
|
else
|
||||||
basedir="@prefix@"
|
basedir="@prefix@"
|
||||||
bindir="@bindir@"
|
bindir="@bindir@"
|
||||||
@ -233,13 +250,6 @@ else
|
|||||||
scriptdir="@scriptdir@"
|
scriptdir="@scriptdir@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -n "$srcdir"
|
|
||||||
then
|
|
||||||
mysqld_opt="--language=$srcdir/sql/share/english"
|
|
||||||
pkgdatadir="$srcdir/scripts"
|
|
||||||
scriptdir="$srcdir/scripts"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Set up paths to SQL scripts required for bootstrap
|
# Set up paths to SQL scripts required for bootstrap
|
||||||
fill_help_tables="$pkgdatadir/fill_help_tables.sql"
|
fill_help_tables="$pkgdatadir/fill_help_tables.sql"
|
||||||
create_system_tables="$pkgdatadir/mysql_system_tables.sql"
|
create_system_tables="$pkgdatadir/mysql_system_tables.sql"
|
||||||
@ -318,7 +328,6 @@ mysqld_bootstrap="${MYSQLD_BOOTSTRAP-$mysqld}"
|
|||||||
mysqld_install_cmd_line="$mysqld_bootstrap $defaults $mysqld_opt --bootstrap \
|
mysqld_install_cmd_line="$mysqld_bootstrap $defaults $mysqld_opt --bootstrap \
|
||||||
--basedir=$basedir --datadir=$ldata --log-warnings=0 --loose-skip-innodb \
|
--basedir=$basedir --datadir=$ldata --log-warnings=0 --loose-skip-innodb \
|
||||||
--loose-skip-ndbcluster $args --max_allowed_packet=8M \
|
--loose-skip-ndbcluster $args --max_allowed_packet=8M \
|
||||||
--default-storage-engine=myisam \
|
|
||||||
--net_buffer_length=16K"
|
--net_buffer_length=16K"
|
||||||
|
|
||||||
# Create the system and help tables by passing them to "mysqld --bootstrap"
|
# Create the system and help tables by passing them to "mysqld --bootstrap"
|
||||||
|
Reference in New Issue
Block a user