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

DROP TABLE suppresses all engine errors

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.5, 10.0, 10.1
    • Fix Version/s: 10.0.20, 10.1.6
    • Component/s: Plugins
    • Labels:
      None
    • Sprint:
      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

            • Assignee:
              serg Sergei Golubchik
              Reporter:
              serg Sergei Golubchik
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: