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

System log table names are case insensitive with lower-cast-table-names=0

    XMLWordPrintable

Details

    Description

      I run this MTR test on Linux:

      --source include/have_lowercase0.inc
      --source include/have_case_sensitive_file_system.inc
       
      CREATE TABLE mysql.GENERAL_log (a INT);
      INSERT INTO mysql.GENERAL_log VALUES (1),(2);
      DROP TABLE mysql.GENERAL_log;
      

      It fails on the INSERT statement with the following error:

      mysqltest: At line 13: query 'INSERT INTO mysql.GENERAL_log VALUES (1),(2)' failed: ER_CANT_LOCK_LOG_TABLE (1556): You can't use locks with log tables
      

      This is wrong. GENERAL_log is not a log table.

      The problem resides in the function get_table_category(), in these line:

          if (lex_string_eq(&GENERAL_LOG_NAME, name))
            return TABLE_CATEGORY_LOG;
      

      This is wrong to compare table names case insensitively in Linux.
      Table names should be compared according to --lower-case-table-names.

      The same problem is repeatable for "slow_log" and "transaction_registry".

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              bar Alexander Barkov
              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.