Commit d890c45b authored by Daniel Black's avatar Daniel Black Committed by Vicențiu Ciorbaru

mysql_install_db: assume builddir is dirname0

The assumption in the original commit for --builddir (648d3ced),
was to assume that without a --builddir, and when --srcdir
is specified, that the builddir is the same as the srcdir.

The problem is that this assumption does not hold for out-of-source
builds and we can figure out the builddir by looking for where
mysql_install_db script is.

As mysql_install_db is in the builddir, we use dirname0 as the builddir after
checking that my_print_defaults is also located from dirname0, otherwise
default to old behavior.
parent 69be8f3c
......@@ -245,8 +245,13 @@ if test -n "$srcdir"
then
if test -z "$builddir"
then
if test -x "$dirname0/extra/my_print_defaults"
then
builddir="$dirname0"
else
builddir="$srcdir"
fi
fi
print_defaults="$builddir/extra/my_print_defaults"
elif test -n "$basedir"
then
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment