[debian-mysql] Bug#1108553: mariadb-server: Upgrading 1:11.8.1-4 to 1:11.8.2-1 generates warning and error, but appears to work

Otto Kekäläinen otto at debian.org
Tue Jul 1 07:33:41 BST 2025


Hi!

Thanks for a detailed report!

The mariadb.service file for systemd/systemctl is inherited as-is from
upstream and it has a change in the most recent upstream release:
https://salsa.debian.org/mariadb-team/mariadb-server/-/blob/debian/latest/support-files/mariadb.service.in

Off the top of my head I don't know how systemd is designed to handle
service file updates, and if this warning is supposed to trigger every
single time any service file updates, and if packages are supposed to
do anything more than just trigger service reloads (like done via
https://salsa.debian.org/mariadb-team/mariadb-server/-/blob/debian/latest/debian/mariadb-server.triggers)
or if maintainer scripts are supposed to run systemctl reloads on
their own.

What comes to the 'mysql.user table already exists!' warning, there
are at least no changes in the maintainer script
https://salsa.debian.org/mariadb-team/mariadb-server/-/blob/debian/latest/debian/mariadb-server.postinst
in latest 1:11.8.2-1, nor for a long time before it either. The `--rpm
--cross-bootstrap` has existed for 10+ years since
https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8823defebeb9bd5c75e4398541a8cf295d5014db
and are correct, albeit confusingly named upstream parameters to tell
the script it is being called from a Linux packaging script.

The most recent functional change to this section is
https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/cde8b8613e08ecb8d5f4a5de09d34418576d3040
by Sunil, but I don't see how it would cause the warnings you are
seeing.

Thus, I think that the mariadb-install-db section has probably emitted
that warning all the time. But you are correct to point out that it is
bad design to have warnings emitted to users about something users
should not worry about. The `mariadb-install-db` should run only if
the data directory is empty and no database exists, and otherwise
`mariadb-upgrade` should run to upgrade the existing database.



More information about the pkg-mysql-maint mailing list