[debian-mysql] Bug#793977: Bug#793977: mariadb-server-core-10.0: please include mysql_upgrade for application started mariadb server

Otto Kekäläinen otto at seravo.fi
Thu Jul 30 06:34:16 UTC 2015


Hello!

Thanks for taking the time to write a good bug report and investigate
the situation. Indeed, mysql_upgrade is at the moment shipped in the
mariadb-server-10.0 package and triggered from its postinstall scripts
and in certain situations from the init script (the debian-start is
called from the init script):

mariadb-10.0/debian$ grep -R mysql_upgrade
*additions/debian-start:MYUPGRADE="/usr/bin/mysql_upgrade
--defaults-extra-file=/etc/mysql/debian.cnf"
additions/mariadb.conf.d/50-mysql-clients.cnf:[mysql_upgrade]
mariadb-server-10.0.install:usr/bin/mysql_upgrade
mariadb-server-10.0.manpages:debian/tmp/usr/share/man/man1/mysql_upgrade.1
mariadb-server-10.0.postinst:    # mysql_upgrade, called from the
/etc/init.d/mysql start script, will
mariadb-server-10.0.postinst:      echo "[mysql_upgrade]"


In mysql-5.6 packaging (which mariadb-10.0 is based on from about two
years ago) the location seems to have been changed the location of the
binary as you recommend but not the postinstall part:

mysql-5.6/debian$ grep -R mysql_upgrade *
additions/debian-start:MYUPGRADE="/usr/bin/mysql_upgrade
--defaults-extra-file=/etc/mysql/debian.cnf"
mysql-server-5.6.postinst:    #   admin might not already have run
mysql_upgrade which adds them.
mysql-server-5.6.postinst:    # recreate the credentials file if not
present or without mysql_upgrade stanza
mysql-server-5.6.postinst:    if [ -e "$dc" -a -n "`fgrep
mysql_upgrade $dc 2>/dev/null`" ]; then
mysql-server-5.6.postinst:        echo "[mysql_upgrade]"
                              >>$dc
mysql-server-core-5.6.install:usr/bin/mysql_upgrade
mysql-server-core-5.6.manpages:debian/tmp/usr/share/man/man1/mysql_upgrade.1



This is the contents of the mariadb-server-core-10.0 package:

mariadb-10.0/debian$ cat mariadb-server-core-10.0.install
usr/bin/innochecksum
usr/sbin/mysqld
usr/share/mysql/charsets
usr/share/mysql/czech
usr/share/mysql/danish
usr/share/mysql/dutch
usr/share/mysql/english
usr/share/mysql/estonian
usr/share/mysql/french
usr/share/mysql/german
usr/share/mysql/greek
usr/share/mysql/hungarian
usr/share/mysql/italian
usr/share/mysql/japanese
usr/share/mysql/korean
usr/share/mysql/norwegian
usr/share/mysql/norwegian-ny
usr/share/mysql/polish
usr/share/mysql/portuguese
usr/share/mysql/romanian
usr/share/mysql/russian
usr/share/mysql/serbian
usr/share/mysql/slovak
usr/share/mysql/spanish
usr/share/mysql/swedish
usr/share/mysql/ukrainian


..and mysql-5.6:

mysql-5.6/debian$ cat mysql-server-core-5.6.install
usr/bin/innochecksum
usr/bin/my_print_defaults
usr/bin/mysql_install_db
usr/bin/mysql_upgrade
usr/sbin/mysqld
usr/sbin/mysqld
usr/share/mysql/bulgarian
usr/share/mysql/charsets
usr/share/mysql/charsets
usr/share/mysql/czech
usr/share/mysql/czech
usr/share/mysql/danish
usr/share/mysql/danish
usr/share/mysql/dictionary.txt
usr/share/mysql/dutch
usr/share/mysql/dutch
usr/share/mysql/english
usr/share/mysql/english
usr/share/mysql/estonian
usr/share/mysql/estonian
usr/share/mysql/fill_help_tables.sql
usr/share/mysql/french
usr/share/mysql/french
usr/share/mysql/german
usr/share/mysql/german
usr/share/mysql/greek
usr/share/mysql/greek
usr/share/mysql/hungarian
usr/share/mysql/hungarian
usr/share/mysql/innodb_memcached_config.sql
usr/share/mysql/italian
usr/share/mysql/italian
usr/share/mysql/japanese
usr/share/mysql/japanese
usr/share/mysql/korean
usr/share/mysql/korean
usr/share/mysql/my-default.cnf
usr/share/mysql/mysql_security_commands.sql
usr/share/mysql/mysql_system_tables.sql
usr/share/mysql/mysql_system_tables_data.sql
usr/share/mysql/norwegian
usr/share/mysql/norwegian
usr/share/mysql/norwegian-ny
usr/share/mysql/norwegian-ny
usr/share/mysql/polish
usr/share/mysql/polish
usr/share/mysql/portuguese
usr/share/mysql/portuguese
usr/share/mysql/romanian
usr/share/mysql/romanian
usr/share/mysql/russian
usr/share/mysql/russian
usr/share/mysql/serbian
usr/share/mysql/serbian
usr/share/mysql/slovak
usr/share/mysql/slovak
usr/share/mysql/spanish
usr/share/mysql/spanish
usr/share/mysql/swedish
usr/share/mysql/swedish
usr/share/mysql/ukrainian
usr/share/mysql/ukrainian


Solving this is _not_ straightforward (for me) because of two reasons:
1) I personally never used just the core package and I don't fully
understand the motivation why it even exists. Is Akonadi the only use
case?
2) The mysql-5.6 packaging is a bit messed up (double entries in
install file, server-core having the mysql_upgrade binary but the
postinst part and init file that could trigger it automatically are
only in the server package) so I it would not make sense to model
mariadb-10.0 packaging after it in this case.

I will need to investigate this more at a later time.

If you understand exactly what is going on here and how it is supposed
to work, and you want the fix quickly, feel free to make a pull
request at the Github mirror of the Debian packaging:
https://github.com/ottok/mariadb-10.0



More information about the pkg-mysql-maint mailing list