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

ARCHIVE tables still don't show up in I_S.TABLES when storage engine is not loaded

    XMLWordPrintable

Details

    Description

      This is a followup to MDEV-11943

      The BLACKHOLE specific aspects of that bug got fixed, the ARCHIVE specific one still remains though.

      When having ARCHIVE tables, but not having the plugin loaded, these tables don't show up in I_S.TABLES, unlike BLACKHOLE tables, which do show up by name and with a "Unknown storage engine 'BLACKHOLE'" note in the TABLE_COLUMNS column.

      So the fix for MDEV-11942 still doesn't work for archive tables, the ha_archive engine plugin can't be installed on demand by mysql_upgrade as it simply can't see that there are orphan ARCHIVE tables that would need this plugin at all.

      How to reproduce:

      On a 10.0.x instance do:

      CREATE TABLE test.a1(id INT) engine=ARCHIVE;
      CREATE TABLE test.b1(id INT) engine=BLACKHOLE;
      

      Then upgrade to 10.1.22, and check I_S.TABLE contents.
      Only one row is returned which shows information for the b1 BLACKHOLE table.
      No row is shown for the a1 ARCHIVE table:

      MariaDB [information_schema]> select * from information_schema.tables where table_schema='test';
      +---------------+--------------+------------+------------+-----------+---------+------------+------------+----------------+-------------+-----------------+--------------+-----------+----------------+-------------+-------------+------------+-----------------+----------+----------------+------------------------------------+
      | TABLE_CATALOG | TABLE_SCHEMA | TABLE_NAME | TABLE_TYPE | ENGINE    | VERSION | ROW_FORMAT | TABLE_ROWS | AVG_ROW_LENGTH | DATA_LENGTH | MAX_DATA_LENGTH | INDEX_LENGTH | DATA_FREE | AUTO_INCREMENT | CREATE_TIME | UPDATE_TIME | CHECK_TIME | TABLE_COLLATION | CHECKSUM | CREATE_OPTIONS | TABLE_COMMENT                      |
      +---------------+--------------+------------+------------+-----------+---------+------------+------------+----------------+-------------+-----------------+--------------+-----------+----------------+-------------+-------------+------------+-----------------+----------+----------------+------------------------------------+
      | def           | test         | b1         | BASE TABLE | BLACKHOLE |    NULL | NULL       |       NULL |           NULL |        NULL |            NULL |         NULL |      NULL |           NULL | NULL        | NULL        | NULL       | NULL            |     NULL | NULL           | Unknown storage engine 'BLACKHOLE' |
      +---------------+--------------+------------+------------+-----------+---------+------------+------------+----------------+-------------+-----------------+--------------+-----------+----------------+-------------+-------------+------------+-----------------+----------+----------------+------------------------------------+
      1 row in set, 1 warning (0.00 sec)
      

      And so mysql_upgrade only installs the ha_blackhole engine plugin, but not the ha_archive one:

      # mysql_upgrade
      [...]
      Phase 2/7: Installing used storage engines
      Checking for tables with unknown storage engine
      installing plugin for 'blackhole' storage engine
      Phase 3/7: Fixing views
      [...]
      

      Attachments

        Activity

          People

            serg Sergei Golubchik
            hholzgra Hartmut Holzgraefe
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

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