Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-36147

MariaDB cannot open page-compressed InnoDB tables at startup if innodb_compression_algorithm other than zlib is specified

Details

    Description

      1. Install various MariaDB-provider packages to use alternate compression providers.
      2. INSTALL SONAME 'provider_lz4' to dynamically install LZ4 provider.
      3. Set innodb_compression_algorithm = lz4 in my.cnf.
      4. Restart server.

      Upon restart, InnoDB will refuse to open the table with this issued:

      2025-02-23 20:56:44 0 [Note] Starting MariaDB 10.11.11-MariaDB-log source revision e69f8cae1a15e15b9e4f5e0f8497e1f17bdc81a4 server_uid DeBx1XoL8rQgRwze1xXPp+SNdRU= as process 3589060
      2025-02-23 20:56:44 0 [ERROR] mariadbd: InnoDB: compression algorithm lz4 (2) is not available. Please, load the corresponding provider plugin.
      2025-02-23 20:56:44 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
      2025-02-23 20:56:44 0 [Note] Plugin 'FEEDBACK' is disabled.
      2025-02-23 20:56:44 0 [Warning] 'innodb-thread-concurrency' was removed. It does nothing now and exists only for compatibility with old my.cnf files.
      2025-02-23 20:56:44 0 [ERROR] Unknown/unsupported storage engine: InnoDB
      2025-02-23 20:56:44 0 [ERROR] Aborting
      

      The only way to fix this is to use --plugin-load=provider_lz4 or add plugin_load = provider_lz4 to my.cnf before starting up mariadb.

      Even though the server already knows that plugin is installed:

      > select * from mysql.plugin;                                                                                                                                              
      +--------------+-----------------+                                                                                                                                                          
      | name         | dl              |                                                                                                                                                          
      +--------------+-----------------+                                                                                                                                                          
      | provider_lz4 | provider_lz4.so |                                                                                                                                                          
      +--------------+-----------------+                                                                                                                                                          
      1 row in set (0.001 sec)                                                                                                                                                                    
      

      It will not actually make it available until the server has fully started. If one changes my.cnf to use innodb_compression_algorithm = zlib or simply removes it, the server will startup fine and the lz4 provider will be available for use, loading InnoDB tables successfully, however compression will then be configured for zlib unless one changes it dynamically after startup.

      Note: as a side-effect of forcing plugin_load=provider_lz4 in my.cnf, the server will also emit:

      2025-02-23 20:56:57 0 [Note] mariadbd: Plugin 'provider_lz4' already installed
      

      on startup as it tries to load the plugins defined in mysql.plugin

      Attachments

        Activity

          People

            serg Sergei Golubchik
            clayne Christopher Layne
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.