I see, if it works like this, it makes sense that is breaks. Unfortunately, since the mariadb instance is managed by akonadi and not by systemd as a system service, I can't think of anything that can be done to prevent this, as it currently stands. Is this the default configuration of akonadi? Or is it your custom configuration? I'd instead use a single system instance of mariadb, handled by systemd. In this case, the mariadb package stops the server before updating it and then restart it, so there shouldn't be any breakage.