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

          Thanks for the report.

          10.11 7e001b2a3cc1efc5ac182a179f061faacdf09085

          --source include/have_innodb.inc
           
          install soname 'provider_lz4';
           
          --let $restart_parameters= --innodb_compression_algorithm=lz4
          --source include/restart_mysqld.inc
           
          # Cleanup
          uninstall soname 'provider_lz4';
          

          10.11 7e001b2a3cc1efc5ac182a179f061faacdf09085

          2025-02-24  1:05:52 0 [ERROR] mariadbd: InnoDB: compression algorithm lz4 (2) is not available. Please, load the corresponding provider plugin.
          2025-02-24  1:05:52 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
          ^ Found warnings in /share8t/bld/10.11-rel/mysql-test/var/log/mysqld.1.err
          

          elenst Elena Stepanova added a comment - Thanks for the report. 10.11 7e001b2a3cc1efc5ac182a179f061faacdf09085 --source include/have_innodb.inc   install soname 'provider_lz4' ;   --let $restart_parameters= --innodb_compression_algorithm=lz4 --source include/restart_mysqld.inc   # Cleanup uninstall soname 'provider_lz4' ; 10.11 7e001b2a3cc1efc5ac182a179f061faacdf09085 2025-02-24 1:05:52 0 [ERROR] mariadbd: InnoDB: compression algorithm lz4 (2) is not available. Please, load the corresponding provider plugin. 2025-02-24 1:05:52 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. ^ Found warnings in /share8t/bld/10.11-rel/mysql-test/var/log/mysqld.1.err

          The compression plugin would be loaded only after InnoDB compression_algorithm_is_not_loaded() failed to find it:

          10.11 49d976feaa9de7d7d1cdde1560d43e637f7b607b

          #0  dlopen (filename=0x7ffc76fd3130 "/dev/shm/10.11/mysql-test/var/plugins/provider_lz4.so", flags=2) at ./src/preload/overrides.c:174
          #1  0x0000558d58574ba4 in plugin_dl_add (dl=dl@entry=0x7ffc76fd3790, MyFlags=MyFlags@entry=64) at /mariadb/10.11/sql/sql_plugin.cc:778
          #2  0x0000558d58574fb6 in plugin_add (tmp_root=tmp_root@entry=0x7ffc76fd44d0, if_not_exists=if_not_exists@entry=true, name=name@entry=0x7ffc76fd3780, dl=dl@entry=0x7ffc76fd3790, MyFlags=MyFlags@entry=64)
              at /mariadb/10.11/sql/sql_plugin.cc:1132
          #3  0x0000558d58575996 in plugin_load (tmp_root=tmp_root@entry=0x7ffc76fd44d0) at /mariadb/10.11/sql/sql_plugin.cc:1971
          #4  0x0000558d5857a2ba in plugin_init (argc=argc@entry=0x558d58e6c040 <remaining_argc>, argv=0x558d9061b8f0, flags=0) at /mariadb/10.11/sql/sql_plugin.cc:1817
          #5  0x0000558d582b1974 in init_server_components () at /mariadb/10.11/sql/mysqld.cc:5236
          #6  0x0000558d582b5a99 in mysqld_main (argc=<optimized out>, argv=<optimized out>) at /mariadb/10.11/sql/mysqld.cc:5880
          #7  0x0000558d582a9eb2 in main (argc=<optimized out>, argv=<optimized out>) at /mariadb/10.11/sql/main.cc:34
          

          The compression provider plugins need to be loaded before innodb_init() is invoked.

          marko Marko Mäkelä added a comment - The compression plugin would be loaded only after InnoDB compression_algorithm_is_not_loaded() failed to find it: 10.11 49d976feaa9de7d7d1cdde1560d43e637f7b607b #0 dlopen (filename=0x7ffc76fd3130 "/dev/shm/10.11/mysql-test/var/plugins/provider_lz4.so", flags=2) at ./src/preload/overrides.c:174 #1 0x0000558d58574ba4 in plugin_dl_add (dl=dl@entry=0x7ffc76fd3790, MyFlags=MyFlags@entry=64) at /mariadb/10.11/sql/sql_plugin.cc:778 #2 0x0000558d58574fb6 in plugin_add (tmp_root=tmp_root@entry=0x7ffc76fd44d0, if_not_exists=if_not_exists@entry=true, name=name@entry=0x7ffc76fd3780, dl=dl@entry=0x7ffc76fd3790, MyFlags=MyFlags@entry=64) at /mariadb/10.11/sql/sql_plugin.cc:1132 #3 0x0000558d58575996 in plugin_load (tmp_root=tmp_root@entry=0x7ffc76fd44d0) at /mariadb/10.11/sql/sql_plugin.cc:1971 #4 0x0000558d5857a2ba in plugin_init (argc=argc@entry=0x558d58e6c040 <remaining_argc>, argv=0x558d9061b8f0, flags=0) at /mariadb/10.11/sql/sql_plugin.cc:1817 #5 0x0000558d582b1974 in init_server_components () at /mariadb/10.11/sql/mysqld.cc:5236 #6 0x0000558d582b5a99 in mysqld_main (argc=<optimized out>, argv=<optimized out>) at /mariadb/10.11/sql/mysqld.cc:5880 #7 0x0000558d582a9eb2 in main (argc=<optimized out>, argv=<optimized out>) at /mariadb/10.11/sql/main.cc:34 The compression provider plugins need to be loaded before innodb_init() is invoked.

          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.