diff options
Diffstat (limited to 'scripts/mysql_install_db.sh')
-rw-r--r-- | scripts/mysql_install_db.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh index d315248ce9c..025e4439940 100644 --- a/scripts/mysql_install_db.sh +++ b/scripts/mysql_install_db.sh @@ -272,9 +272,16 @@ then fi if test -n "$srcdir" then + # In an out-of-source build, builddir is not srcdir. Try to guess where + # builddir is by looking for my_print_defaults. if test -z "$builddir" then - builddir="$srcdir" + 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" |