Merge lp:~ignacio-nin/percona-server/5.6-bug1169522 into lp:percona-server/5.6

Proposed by Ignacio Nin
Status: Merged
Approved by: Laurynas Biveinis
Approved revision: no longer in the source branch.
Merged at revision: 398
Proposed branch: lp:~ignacio-nin/percona-server/5.6-bug1169522
Merge into: lp:percona-server/5.6
Diff against target: 35 lines (+9/-4)
1 file modified
build/percona-server.spec (+9/-4)
To merge this branch: bzr merge lp:~ignacio-nin/percona-server/5.6-bug1169522
Reviewer Review Type Date Requested Status
Laurynas Biveinis (community) Approve
Review via email: mp+172266@code.launchpad.net

Description of the change

Fix for bug #1169522. The way this was implemented is that mysql_install_db is not called if the $datadir/mysql directory exists. Also useless calls to mkdir for the mysql and test databases were removed.

To post a comment you must log in.
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'build/percona-server.spec'
--- build/percona-server.spec 2013-06-25 13:13:06 +0000
+++ build/percona-server.spec 2013-07-01 02:35:50 +0000
@@ -737,13 +737,11 @@
737if [ ! -d $mysql_datadir ] ; then mkdir -m 755 $mysql_datadir; fi737if [ ! -d $mysql_datadir ] ; then mkdir -m 755 $mysql_datadir; fi
738# echo "Analyzed: SERVER_TO_START=$SERVER_TO_START"738# echo "Analyzed: SERVER_TO_START=$SERVER_TO_START"
739if [ ! -d $mysql_datadir/mysql ] ; then739if [ ! -d $mysql_datadir/mysql ] ; then
740 mkdir $mysql_datadir/mysql;
741 echo "MySQL RPM installation of version $NEW_VERSION" >> $STATUS_FILE740 echo "MySQL RPM installation of version $NEW_VERSION" >> $STATUS_FILE
742else741else
743 # If the directory exists, we may assume it is an upgrade.742 # If the directory exists, we may assume it is an upgrade.
744 echo "MySQL RPM upgrade to version $NEW_VERSION" >> $STATUS_FILE743 echo "MySQL RPM upgrade to version $NEW_VERSION" >> $STATUS_FILE
745fi744fi
746if [ ! -d $mysql_datadir/test ] ; then mkdir $mysql_datadir/test; fi
747745
748# ----------------------------------------------------------------------746# ----------------------------------------------------------------------
749# Make MySQL start/shutdown automatically when the machine does it.747# Make MySQL start/shutdown automatically when the machine does it.
@@ -778,8 +776,15 @@
778# ----------------------------------------------------------------------776# ----------------------------------------------------------------------
779# Initiate databases if needed777# Initiate databases if needed
780# ----------------------------------------------------------------------778# ----------------------------------------------------------------------
781%{_bindir}/mysql_install_db --rpm --user=%{mysqld_user} \779 # Does $mysql_datadir/mysql exist? In this case, this is probably an
782 --datadir=$mysql_datadir780 # upgrade from a previous version or a reinstall. It's best not to
781 # call mysql_install_db in this case since the test db would be
782 # possibly recreated (bug #1169522).
783 if test ! -e $mysql_datadir/mysql
784 then
785 %{_bindir}/mysql_install_db --rpm --user=%{mysqld_user} \
786 --datadir=$mysql_datadir
787 fi
783788
784# ----------------------------------------------------------------------789# ----------------------------------------------------------------------
785# Upgrade databases if needed would go here - but it cannot be automated yet790# Upgrade databases if needed would go here - but it cannot be automated yet

Subscribers

People subscribed via source and target branches