summaryrefslogtreecommitdiff
path: root/scripts/mysql_install_db.sh
diff options
context:
space:
mode:
authorDaniel Black <grooverdan@users.sourceforge.net>2019-01-11 19:35:46 +1100
committerSergei Golubchik <serg@mariadb.org>2019-01-21 17:30:07 +0100
commit50e593386fcbaa1ca7bd2ed9fdfc51fd5102cdab (patch)
treeff1039150a5b983a557797b782de4eb1038d0945 /scripts/mysql_install_db.sh
parent0d3c49ef5de3fa7356851dd7a05052f5360d0ae6 (diff)
downloadmariadb-git-50e593386fcbaa1ca7bd2ed9fdfc51fd5102cdab.tar.gz
MDEV-14580: mysql_install_db elements based on dirname of mysql_install_db
Closes #1086
Diffstat (limited to 'scripts/mysql_install_db.sh')
-rw-r--r--scripts/mysql_install_db.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh
index f56de12d931..f1249e1d06b 100644
--- a/scripts/mysql_install_db.sh
+++ b/scripts/mysql_install_db.sh
@@ -253,6 +253,9 @@ then
cannot_find_file my_print_defaults $basedir/bin $basedir/extra
exit 1
fi
+elif test -x "$(dirname $0)/../@bindir@/my_print_defaults"
+then
+ print_defaults="$(dirname $0)/../@bindir@/my_print_defaults"
else
print_defaults="@bindir@/my_print_defaults"
fi
@@ -304,6 +307,14 @@ then
cannot_find_file fill_help_tables.sql @pkgdata_locations@
exit 1
fi
+# relative from where the script was run for a relocatable install
+elif test -x "$(dirname $0)/../@INSTALL_SBINDIR@/mysqld"
+then
+ basedir="$(dirname $0)/../"
+ bindir="$basedir/@INSTALL_SBINDIR@"
+ resolveip="$bindir/resolveip"
+ mysqld="$basedir/@INSTALL_SBINDIR@/mysqld"
+ pkgdatadir="$basedir/@INSTALL_MYSQLSHAREDIR@"
else
basedir="@prefix@"
bindir="@bindir@"