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

DROP TABLE suppresses all engine errors

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 5.5(EOL), 10.0(EOL), 10.1(EOL)
    • 10.0.20, 10.1.6
    • Plugins
    • None
    • 10.0.20

    Description

      DROP TABLE uses ha_delete_table() function to delete a table. This function intercepts all storage engine errors and turns them into warnings. And prints "Table not found".

      This behavior was added more than 10 years ago, supposedly for MyISAM errors like missing MYI or MYD file. It was incorrect to generalize it to all possible errors in all possible storage engines.

      Note 1: It is not very clear what the expected DROP TABLE behavior should be when many tables are dropped at the same time (and some of them fail, and with different engine errors).

      Note 2: There is a hack in the DROP TABLE implementation to recognize a foreign key violation storage engine error and issue the corresponding error message instead of "table not found". The foreign key error message is hard-coded, and it doesn't work very in case of multitable drop (see above). I suppose we should remove this hack when fixing this bug and use the generic approach.

      Attachments

        Activity

          People

            serg Sergei Golubchik
            serg Sergei Golubchik
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.