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

DROP DATABASE throw "Directory not empty" after changed lower_case_table_names

    XMLWordPrintable

Details

    Description

      to reproduce

      OS: Unix
      lower_case_table_names = 0 # default value for unix

      CREATE DATABASE to_be_lowered;
      USE to_be_lowered;
      CREATE TABLE T1(c1 INT);
      

      Stop service

      Change lower_case_table_names in my.cnf to
      lower_case_table_names = 1

      start service

      DROP DATABASE to_be_lowered;
      

      SQL Error (1010): Error drop database (can't rmdir './to_be_lowered', errno: 39 "Directory not empty)
      

      The error message comes from unix rmdir himself.

      All *.ibd and db.opt already deleted, but files T1.frm still exists in database directory,
      which provoke above error message.

      DROP DATABASE should check, if some .frm names are in the datadir with capital_letters,
      if lower_case_table_names = 1

      2 Solutions are possible.

      1. Throw an error before ! deleting *.ibd files

      2. Delete also the .frm files with Captial letter.

      Attachments

        Activity

          People

            holyfoot Alexey Botchkov
            Richard Richard Stracke
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.