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

Bad case letter in *.ibd files with --lower-case-table-names=2

    XMLWordPrintable

Details

    Description

      I start a MariaDB Linux server on a case insensitive file system with --lower-case-table-names=2.

      Now run these scripts:

      CREATE DATABASE db_myisam;
      CREATE TABLE db_myisam.`O` (a INT) ENGINE=MyISAM;
      CREATE TABLE db_myisam.`Ó` (a INT) ENGINE=MyISAM;
      CREATE TABLE db_myisam.`#mysql50#Ó` (a INT) ENGINE=MyISAM;
      

      CREATE DATABASE db_aria;
      CREATE TABLE db_aria.`O` (a INT) ENGINE=Aria;
      CREATE TABLE db_aria.`Ó` (a INT) ENGINE=Aria;
      CREATE TABLE db_aria.`#mysql50#Ó` (a INT) ENGINE=Aria;
      

      CREATE DATABASE db_innodb;
      CREATE TABLE db_innodb.`O` (a INT) ENGINE=InnoDB;
      CREATE TABLE db_innodb.`Ó` (a INT) ENGINE=InnoDB;
      CREATE TABLE db_innodb.`#mysql50#Ó` (a INT) ENGINE=InnoDB;
      

      Then I execute these `ls` commands in the data directory:

      ls -l db_myisam/
      ls -l db_aria/
      ls -l db_innodb/
      

      The output is:

      ls -l db_myisam/
      -rwxr-xr-x. 1 bar bar  432 Sep  1 15:37 @0Z.frm
      -rwxr-xr-x. 1 bar bar    0 Sep  1 15:37 @0Z.MYD
      -rwxr-xr-x. 1 bar bar 1024 Sep  1 15:37 @0Z.MYI
      -rwxr-xr-x. 1 bar bar   67 Sep  1 15:37 db.opt
      -rwxr-xr-x. 1 bar bar  432 Sep  1 15:37 O.frm
      -rwxr-xr-x. 1 bar bar  432 Sep  1 15:37 Ó.frm
      -rwxr-xr-x. 1 bar bar    0 Sep  1 15:37 O.MYD
      -rwxr-xr-x. 1 bar bar    0 Sep  1 15:37 Ó.MYD
      -rwxr-xr-x. 1 bar bar 1024 Sep  1 15:37 O.MYI
      -rwxr-xr-x. 1 bar bar 1024 Sep  1 15:37 Ó.MYI
      

      ls -l db_aria/
      -rwxr-xr-x. 1 bar bar  430 Sep  1 15:37 @0Z.frm
      -rwxr-xr-x. 1 bar bar 8192 Sep  1 15:37 @0Z.MAD
      -rwxr-xr-x. 1 bar bar 8192 Sep  1 15:37 @0Z.MAI
      -rwxr-xr-x. 1 bar bar   67 Sep  1 15:37 db.opt
      -rwxr-xr-x. 1 bar bar  430 Sep  1 15:37 O.frm
      -rwxr-xr-x. 1 bar bar  430 Sep  1 15:37 Ó.frm
      -rwxr-xr-x. 1 bar bar 8192 Sep  1 15:37 O.MAD
      -rwxr-xr-x. 1 bar bar 8192 Sep  1 15:37 Ó.MAD
      -rwxr-xr-x. 1 bar bar 8192 Sep  1 15:37 O.MAI
      -rwxr-xr-x. 1 bar bar 8192 Sep  1 15:37 Ó.MAI
      

      ls -l db_innodb/
      -rwxr-xr-x. 1 bar bar   432 Sep  1 15:38 @0Z.frm
      -rwxr-xr-x. 1 bar bar 65536 Sep  1 15:38 @0z.ibd
      -rwxr-xr-x. 1 bar bar    67 Sep  1 15:38 db.opt
      -rwxr-xr-x. 1 bar bar   432 Sep  1 15:38 O.frm
      -rwxr-xr-x. 1 bar bar   432 Sep  1 15:38 Ó.frm
      -rwxr-xr-x. 1 bar bar 65536 Sep  1 15:38 o.ibd
      -rwxr-xr-x. 1 bar bar 65536 Sep  1 15:38 ó.ibd
      

      Notice, MyISAM and Aria tables have equal letter case in *.frm and data files (MAD/MAI,MYD/MYI). For example, O.frm and O.MYD.

      InnoDB tables have different letter case in *.frm vs *.ibd files, for example: O.frm vs o.ibd.

      It should be possible to move a --lower-case-table-names=2 data directory to a case sensitive file system and run the server with --lower-case-table-names=0 on it.

      MyISAM and Aria work correctly. InnoDB does not.

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.