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

Aria: DROP TABLE warns "uses an extension that doesn't exist" for a table with a fulltext parser plugin

    XMLWordPrintable

Details

    • Bug
    • Status: In Review (View Workflow)
    • Critical
    • Resolution: Unresolved
    • 10.11.19, 11.4.13, 11.8.9, 12.3.3
    • 11.4
    • Storage Engine - Aria
    • Any platform; reproduced on main (13.2.0) debug build on Linux
    • Can result in unexpected behaviour
    • DROP TABLE on an Aria table whose fulltext index uses a parser plugin no longer warns "uses an extension that doesn't exist", and the drop is written to the Aria log again.

    Description

      INSTALL PLUGIN simple_parser SONAME 'mypluglib';
      CREATE TABLE t1 (a TEXT, FULLTEXT(a) WITH PARSER simple_parser) ENGINE=Aria;
      DROP TABLE t1;
      

      Warning 1112 Table 't1' uses an extension that doesn't exist in this MariaDB version
      

      maria_delete_table() opens the table with HA_OPEN_FOR_DROP | HA_OPEN_FOR_REPAIR to find out whether it is transactional. A table whose fulltext index uses a parser plugin is created with HA_OPTION_RELIES_ON_SQL_LAYER, and maria_open() refuses such a table unless HA_OPEN_FROM_SQL_LAYER is set, so it fails with HA_ERR_UNSUPPORTED. The files are still removed, but DROP TABLE returns the warning, and for a transactional table the REDO_DROP_TABLE record is not written to the Aria log.

      It happens with any parser plugin; we found it while working on MDEV-10267 (ngram). MyISAM is not affected. The code is the same from 10.11 to main.

      Proposed fix: let maria_open() accept HA_OPEN_FOR_DROP for such tables, since opening for drop only reads the share. We have the patch with an mtr test and will open a PR against 11.4 once this issue has a number.

      Attachments

        Issue Links

          Activity

            People

              sanja Oleksandr Byelkin
              Futureweb Andreas Schnederle-Wagner
              Oleksandr Byelkin Oleksandr Byelkin
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - 0d
                  0d
                  Remaining:
                  Remaining Estimate - 1h
                  1h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified

                  Git Integration

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