[debian-mysql] Bug#1037327: MariaDB upgrade fails if page compressed tables exist already due to plugin dependency

Laurence Parry greenreaper at gmail.com
Sun Jun 11 12:35:00 BST 2023


Package: mariadb-server
Version: 1:10.11.3-1

Dear Maintainer,

When trying to upgrade a (sysvinit) Debian Bullseye[-backports] server with
MariaDB 10.5 to Bookworm, I ran into the following issue:

Setting up mariadb-server (1:10.11.3-1) ...
Stopping MariaDB database server: mariadbd.
Starting MariaDB database server: mariadbd . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . failed!
invoke-rc.d: initscript mariadb, action "start" failed.
dpkg: error processing package mariadb-server (--configure):
 installed mariadb-server package post-installation script subprocess
returned error exit status 1
[...]
dpkg: dependency problems prevent configuration of
mariadb-plugin-provider-lz4:
 mariadb-plugin-provider-lz4 depends on mariadb-server (>= 1:10.11.1-1);
however:
  Package mariadb-server is not configured yet.

dpkg: error processing package mariadb-plugin-provider-lz4 (--configure):
 dependency problems - leaving unconfigured

This occurred because the piwik/matamo database already contained
lz4-compressed tables. MariaDB complained about lacking the plugin, and
mariadb-server could not complete config. mariadb-plugin-provider-lz4 could
not be installed as it depended on mariadb-server.

My my.cnf has (from https://mariadb.com/kb/en/innodb-page-compression/ ):
innodb_compression_algorithm=lz4
innodb_compression_default=ON

I ended up having to manually download from:
https://packages.debian.org/bookworm/amd64/mariadb-plugin-provider-lz4/download
and force it to ignore the dependency:
dpkg -i --force-depends mariadb-plugin-provider-lz4_10.11.3-1_amd64.deb

After this I could fix the installation and the server started. Removing
the plugin package predictably breaks the server again - this also
reproduces the "not available" error I got after trying to run the server
manually, which wasn't surfaced during the install:

2023-06-11 13:08:58 0 [Note] Starting MariaDB 10.11.3-MariaDB-1 source
revision  as process 16188
2023-06-11 13:08:58 0 [ERROR] mysqld: Can't open shared library
'/usr/lib/mysql/plugin/provider_lz4.so' (errno: 2, cannot open shared
object file: No such file or directory)
2023-06-11 13:08:58 0 [ERROR] Couldn't load plugins from 'provider_lz4.so'.
2023-06-11 13:08:58 0 [ERROR] mysqld: InnoDB: compression algorithm lz4 (2)
is not available. Please, load the corresponding provider plugin.
2023-06-11 13:08:58 0 [ERROR] Plugin 'InnoDB' init function returned error.
2023-06-11 13:08:58 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE
ENGINE failed.
2023-06-11 13:08:58 0 [Note] Plugin 'FEEDBACK' is disabled.
2023-06-11 13:08:58 0 [ERROR] mysqld: unknown variable
'provider_lz4=force_plus_permanent'
2023-06-11 13:08:58 0 [ERROR] Aborting

I can appreciate that the plugins may rely on mariadb-server to be
installed to an extent. However it does not have to be installed the whole
way otherwise dpkg wouldn't have worked. Perhaps the plugins could be
installed despite mariadb-server not being fully configured, and in this
case it should trigger the server to be reconfigured after the plugins are
installed.

Sample table structure shows "PAGE_COMPRESSED":
| piwik_log_action | CREATE TABLE `piwik_log_action` (
  `idaction` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(4096) DEFAULT NULL,
  `hash` int(10) unsigned NOT NULL,
  `type` tinyint(3) unsigned DEFAULT NULL,
  `url_prefix` tinyint(2) DEFAULT NULL,
  PRIMARY KEY (`idaction`),
  KEY `index_type_hash` (`type`,`hash`)
) ENGINE=InnoDB AUTO_INCREMENT=116404687 DEFAULT CHARSET=utf8mb4
COLLATE=utf8mb4_general_ci `PAGE_COMPRESSED`=1 |

# uname -a
Linux acedia 6.1.27 #1 SMP Thu Jun  8 16:12:46 CEST 2023 x86_64 GNU/Linux
Libc: Version: 2.36-9

Best regards,
-- 
Laurence "GreenReaper" Parry
https://www.greenreaper.co.uk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-mysql-maint/attachments/20230611/c26a3d7a/attachment.htm>


More information about the pkg-mysql-maint mailing list