1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fix for bug#18516 (also #19353, reported for 5.1):

In addition to include "mysql_upgrade" in a RPM, it should also be called
when the RPM is upgraded.
This commit is contained in:
joerg@mysql.com
2006-06-20 22:40:46 +02:00
parent 337396d19a
commit 27df8b07b7
2 changed files with 29 additions and 5 deletions

View File

@ -485,7 +485,16 @@ chown -R %{mysqld_user}:%{mysqld_group} $mysql_datadir
%{_bindir}/mysql_install_db --rpm --user=%{mysqld_user}
# Upgrade databases if needed
%{_bindir}/mysql_upgrade --user=%{mysqld_user}
# This must be done as database user "root", who should be password-protected,
# but this password is not available here.
# So ensure the server is isolated as much as possible, and start it so that
# passwords are not checked.
# See the related change in the start script "/etc/init.d/mysql".
chmod 700 $mysql_datadir
%{_sysconfdir}/init.d/mysql start --skip-networking --skip-grant-tables
%{_bindir}/mysql_upgrade
%{_sysconfdir}/init.d/mysql stop --skip-networking --skip-grant-tables
chmod 755 $mysql_datadir
# Change permissions again to fix any new files.
chown -R %{mysqld_user}:%{mysqld_group} $mysql_datadir
@ -723,6 +732,11 @@ fi
# itself - note that they must be ordered by date (important when
# merging BK trees)
%changelog
* Tue Jun 20 2006 Joerg Bruehe <joerg@mysql.com>
- To run "mysql_upgrade", we need a running server;
start it in isolation and skip password checks.
* Sat May 20 2006 Kent Boortz <kent@mysql.com>
- Always compile for PIC, position independent code.