Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Not a Bug
    • Affects Version/s: 10.0.17
    • Fix Version/s: N/A
    • Component/s: OTHER
    • Labels:
      None

      Description

      Have ignore-db-dir = 'lost+found' in my.cnf
      It is recognized:
      show global variables like 'ignore_db_dirs';

      Variable_name Value
      ignore_db_dirs lost+found

      But lost+found is not hidden

      show databases like "lost+found";

      Database (lost+found)
      lost+found

      Worked correctly in version 5.5.38

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            elenst Elena Stepanova added a comment -

            Hi,

            Please note that ignore_db_dirs refer to the directory name, as opposed to the database name, and the difference is important here.

            From your output, it looks like you previously ran
            create database `lost+found`, and not
            mkdir <datadir>/lost+found.

            If you look into your datadir, you'll see that the existing directory is not lost+found, it's something like lost@002bfound. It gets converted back when you run show databases.

            It works the same way in 5.5.38 and 10.0, see output from 5.5.38 below.

            MariaDB [test]> select @@version;
            +----------------+
            | @@version      |
            +----------------+
            | 5.5.38-MariaDB |
            +----------------+
            1 row in set (0.00 sec)
            
            MariaDB [test]> select @@ignore_db_dirs;
            +------------------+
            | @@ignore_db_dirs |
            +------------------+
            | lost+found       |
            +------------------+
            1 row in set (0.00 sec)
            
            MariaDB [test]> select @@datadir;
            +--------------------------------------------------+
            | @@datadir                                        |
            +--------------------------------------------------+
            | /data/releases/mariadb-5.5.38-linux-x86_64/data/ |
            +--------------------------------------------------+
            1 row in set (0.00 sec)
            
            MariaDB [test]> system ls /data/releases/mariadb-5.5.38-linux-x86_64/data/
            aria_log.00000001  aria_log_control  ibdata1  ib_logfile0  ib_logfile1	mysql  performance_schema  test  wheezy-64.err	wheezy-64.pid
            
            MariaDB [test]> system mkdir /data/releases/mariadb-5.5.38-linux-x86_64/data/lost+found
            
            MariaDB [test]> system ls /data/releases/mariadb-5.5.38-linux-x86_64/data/
            aria_log.00000001  aria_log_control  ibdata1  ib_logfile0  ib_logfile1	lost+found  mysql  performance_schema  test  wheezy-64.err  wheezy-64.pid
            
            MariaDB [test]> show databases like "lost+found";
            Empty set (0.00 sec)
            
            MariaDB [test]> create database `lost+found`;
            Query OK, 1 row affected (0.00 sec)
            
            MariaDB [test]> system ls /data/releases/mariadb-5.5.38-linux-x86_64/data/
            aria_log.00000001  ibdata1	ib_logfile1	lost+found  performance_schema	wheezy-64.err
            aria_log_control   ib_logfile0	lost@002bfound	mysql	    test		wheezy-64.pid
            
            MariaDB [test]> show databases like "lost+found";
            +-----------------------+
            | Database (lost+found) |
            +-----------------------+
            | lost+found            |
            +-----------------------+
            1 row in set (0.00 sec)
            
            Show
            elenst Elena Stepanova added a comment - Hi, Please note that ignore_db_dirs refer to the directory name, as opposed to the database name, and the difference is important here. From your output, it looks like you previously ran create database `lost+found` , and not mkdir <datadir>/lost+found . If you look into your datadir, you'll see that the existing directory is not lost+found , it's something like lost@002bfound . It gets converted back when you run show databases . It works the same way in 5.5.38 and 10.0, see output from 5.5.38 below. MariaDB [test]> select @@version; +----------------+ | @@version | +----------------+ | 5.5.38-MariaDB | +----------------+ 1 row in set (0.00 sec) MariaDB [test]> select @@ignore_db_dirs; +------------------+ | @@ignore_db_dirs | +------------------+ | lost+found | +------------------+ 1 row in set (0.00 sec) MariaDB [test]> select @@datadir; +--------------------------------------------------+ | @@datadir | +--------------------------------------------------+ | /data/releases/mariadb-5.5.38-linux-x86_64/data/ | +--------------------------------------------------+ 1 row in set (0.00 sec) MariaDB [test]> system ls /data/releases/mariadb-5.5.38-linux-x86_64/data/ aria_log.00000001 aria_log_control ibdata1 ib_logfile0 ib_logfile1 mysql performance_schema test wheezy-64.err wheezy-64.pid MariaDB [test]> system mkdir /data/releases/mariadb-5.5.38-linux-x86_64/data/lost+found MariaDB [test]> system ls /data/releases/mariadb-5.5.38-linux-x86_64/data/ aria_log.00000001 aria_log_control ibdata1 ib_logfile0 ib_logfile1 lost+found mysql performance_schema test wheezy-64.err wheezy-64.pid MariaDB [test]> show databases like "lost+found" ; Empty set (0.00 sec) MariaDB [test]> create database `lost+found`; Query OK, 1 row affected (0.00 sec) MariaDB [test]> system ls /data/releases/mariadb-5.5.38-linux-x86_64/data/ aria_log.00000001 ibdata1 ib_logfile1 lost+found performance_schema wheezy-64.err aria_log_control ib_logfile0 lost@002bfound mysql test wheezy-64.pid MariaDB [test]> show databases like "lost+found" ; +-----------------------+ | Database (lost+found) | +-----------------------+ | lost+found | +-----------------------+ 1 row in set (0.00 sec)
            Hide
            ainsley31415926 Ainsley added a comment -

            Thank you, you were correct.
            'lost@002bfound' was created by a raw data directory copy from one data dir to another.

            Show
            ainsley31415926 Ainsley added a comment - Thank you, you were correct. 'lost@002bfound' was created by a raw data directory copy from one data dir to another.
            Hide
            elenst Elena Stepanova added a comment -

            In this case it works as expected, closing a 'Not a bug'.
            Please feel free to comment if you disagree.

            Show
            elenst Elena Stepanova added a comment - In this case it works as expected, closing a 'Not a bug'. Please feel free to comment if you disagree.

              People

              • Assignee:
                Unassigned
                Reporter:
                ainsley31415926 Ainsley
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: