• unknown's avatar
    Clean up the mysql_install_db script to ensure that a sane environment is · 17136906
    unknown authored
    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.
    17136906
mysql_install_db.sh 11.4 KB