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

LOCK TABLE t1 AS t2 -- alias is not case sensitive with lower-case-table-names=0

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.4, 11.4
    • 10.4, 11.4
    • Locking
    • None

    Description

      I execute this SQL script with a Linux server running with --lower-case-table-names=0:

      CREATE OR REPLACE TABLE t1 (a INT);
      INSERT INTO t1 VALUES (1);
      LOCK TABLE t1 AS t2 READ;
      SELECT * FROM t1 AS t2;
      UNLOCK TABLES;
      

      +------+
      | a    |
      +------+
      |    1 |
      +------+
      

      Now I run this script

      LOCK TABLE t1 AS t2 READ;
      SELECT * FROM t1 AS T2;
      UNLOCK TABLES;
      

      It returns a result set without errors:

      +------+
      | a    |
      +------+
      |    1 |
      +------+
      

      Looks wrong. The expected behavior would be to return this error:

      Table `T2` was not locked with LOCK TABLES"
      

      Attachments

        Issue Links

          Activity

            People

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