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

Odd behavior upon using Archive as default engine after plugin uninstallation

    XMLWordPrintable

Details

    Description

      It's a meaningless test case in any practical sense, but as I've come across it accidentally, I'll leave a record of it.

      install soname 'ha_archive';
      set default_storage_engine = archive;
      uninstall soname 'ha_archive';
      create table t (a int);
      show tables;
      show create table t;
       
      drop table if exists t;
      

      main d2803e117b15b2868a65e6289d3a4e77b891c2dd

      install soname 'ha_archive';
      set default_storage_engine = archive;
      uninstall soname 'ha_archive';
      Warnings:
      Warning 1620    Plugin is busy and will be uninstalled on shutdown
      create table t (a int);
      show tables;
      Tables_in_test
      show create table t;
      bug.t                                    [ fail ]
              Test ended at 2026-04-20 21:49:48
       
      CURRENT_TEST: bug.t
      mysqltest: At line 6: query 'show create table t' failed: ER_NO_SUCH_TABLE (1146): Table 'test.t' doesn't exist
      

      We install the engine just to be able to set it as a default engine, then we uninstall the plugin and run CREATE TABLE. It pretends to work, but no table is actually created.

      Other engines which I tried (Federated, Blackhole, RocksDB, Spider, Connect) in the same situation would still allow the table to be created – which is also a bit strange, given that engine=... specified explicitly in CREATE statement makes it throw the ER_UNKNOWN_STORAGE_ENGINE error (for all engines, including Archive), but I suppose creating a table is less wrong and can be justified by the prior "plugin is busy" warning, while pretending to create table without actually doing it can hardly be expected.

      Attachments

        Activity

          People

            Unassigned Unassigned
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.