diff options
author | Joerg Bruehe <joerg.bruehe@oracle.com> | 2011-07-07 17:27:44 +0200 |
---|---|---|
committer | Joerg Bruehe <joerg.bruehe@oracle.com> | 2011-07-07 17:27:44 +0200 |
commit | 8cf0ebcaac5c956f5941d6798b0f3f2bd51041e8 (patch) | |
tree | 45ab42b308c4201f6b0fcdd6def48d07e7ad2acb /support-files | |
parent | 71e0ff64f070b7ebcf9c25d7c9e75a0aa4970163 (diff) | |
parent | c6669b46d6b3bc885e6dc30916314476def75cf9 (diff) | |
download | mariadb-git-8cf0ebcaac5c956f5941d6798b0f3f2bd51041e8.tar.gz |
Upmerge the 45415 fix from 5.1 to 5.5
Diffstat (limited to 'support-files')
-rw-r--r-- | support-files/mysql.spec.sh | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 2438f576fd8..cc4477f2fac 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -721,13 +721,12 @@ else fi # echo "Analyzed: SERVER_TO_START=$SERVER_TO_START" if [ ! -d $mysql_datadir/mysql ] ; then - mkdir $mysql_datadir/mysql; + mkdir $mysql_datadir/mysql $mysql_datadir/test echo "MySQL RPM installation of version $NEW_VERSION" >> $STATUS_FILE else # If the directory exists, we may assume it is an upgrade. echo "MySQL RPM upgrade to version $NEW_VERSION" >> $STATUS_FILE fi -if [ ! -d $mysql_datadir/test ] ; then mkdir $mysql_datadir/test; fi # ---------------------------------------------------------------------- # Make MySQL start/shutdown automatically when the machine does it. @@ -762,7 +761,12 @@ chown -R %{mysqld_user}:%{mysqld_group} $mysql_datadir # ---------------------------------------------------------------------- # Initiate databases if needed # ---------------------------------------------------------------------- -%{_bindir}/mysql_install_db --rpm --user=%{mysqld_user} +if ! grep '^MySQL RPM upgrade' $STATUS_FILE >/dev/null 2>&1 ; then + # Fix bug#45415: no "mysql_install_db" on an upgrade + # Do this as a negative to err towards more "install" runs + # rather than to miss one. + %{_bindir}/mysql_install_db --rpm --user=%{mysqld_user} +fi # ---------------------------------------------------------------------- # Upgrade databases if needed would go here - but it cannot be automated yet @@ -1126,6 +1130,13 @@ echo "=====" >> $STATUS_HISTORY # merging BK trees) ############################################################################## %changelog +* Thu Jul 07 2011 Joerg Bruehe <joerg.bruehe@oracle.com> + +- Fix bug#45415: "rpm upgrade recreates test database" + Let the creation of the "test" database happen only during a new installation, + not in an RPM upgrade. + This affects both the "mkdir" and the call of "mysql_install_db". + * Thu Feb 09 2011 Joerg Bruehe <joerg.bruehe@oracle.com> - Fix bug#56581: If an installation deviates from the default file locations |