Skip to content

Commit 50e5933

Browse files
grooverdanvuvova
authored andcommitted
MDEV-14580: mysql_install_db elements based on dirname of mysql_install_db
Closes #1086
1 parent 0d3c49e commit 50e5933

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

scripts/mysql_install_db.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,9 @@ then
253253
cannot_find_file my_print_defaults $basedir/bin $basedir/extra
254254
exit 1
255255
fi
256+
elif test -x "$(dirname $0)/../@bindir@/my_print_defaults"
257+
then
258+
print_defaults="$(dirname $0)/../@bindir@/my_print_defaults"
256259
else
257260
print_defaults="@bindir@/my_print_defaults"
258261
fi
@@ -304,6 +307,14 @@ then
304307
cannot_find_file fill_help_tables.sql @pkgdata_locations@
305308
exit 1
306309
fi
310+
# relative from where the script was run for a relocatable install
311+
elif test -x "$(dirname $0)/../@INSTALL_SBINDIR@/mysqld"
312+
then
313+
basedir="$(dirname $0)/../"
314+
bindir="$basedir/@INSTALL_SBINDIR@"
315+
resolveip="$bindir/resolveip"
316+
mysqld="$basedir/@INSTALL_SBINDIR@/mysqld"
317+
pkgdatadir="$basedir/@INSTALL_MYSQLSHAREDIR@"
307318
else
308319
basedir="@prefix@"
309320
bindir="@bindir@"

0 commit comments

Comments
 (0)