Commit 17136906 authored by unknown's avatar unknown

Clean up the mysql_install_db script to ensure that a sane environment is

available and reduce the chance of failure.  This should fix bug#28585
which is caused by the script being quite random in how it finds files it
requires and not giving very good feedback to the user about what went
wrong.

Also update make_binary_distribution so that it provides the correct path
to the required SQL scripts when generating mysql_install_db.  The script
only previously worked because of the permissive behaviour which looked
around the current working directory before the "correct" location.  This
could lead to severe problems if the user happened to run the script from
a location which contained older or even broken copies of the SQL scripts.

We now require either a complete binary release (and the mysql_install_db
script ran from inside the extracted archive), or an installed compiled
tree, as this is the only way we can be sure everything that we need is
available and ready to run.

While working on this fix, also clean up the mysql_install_db script a lot
to make it simpler, easier to read, and hopefully less prone to bugs in
the future.


scripts/make_binary_distribution.sh:
  SQL files live in ./share not ./support-files in binary distribution.
scripts/mysql_install_db.sh:
  Use a consistent shell indentation style.
parent 47507276
......@@ -318,7 +318,7 @@ if [ $BASE_SYSTEM != "netware" ] ; then
copyfileto $BASE/bin scripts/*
$BASE/bin/replace \@localstatedir\@ ./data \@bindir\@ ./bin \@scriptdir\@ \
./bin \@libexecdir\@ ./bin \@sbindir\@ ./bin \@prefix\@ . \@HOSTNAME\@ \
@HOSTNAME@ \@pkgdatadir\@ ./support-files \
@HOSTNAME@ \@pkgdatadir\@ ./share \
< scripts/mysql_install_db.sh > $BASE/scripts/mysql_install_db
$BASE/bin/replace \@prefix\@ /usr/local/mysql \@bindir\@ ./bin \
\@sbindir\@ ./bin \@libexecdir\@ ./bin \
......
This diff is collapsed.
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