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

Table is not locked with LOCK TABLES for DELETE with alias

    XMLWordPrintable

Details

    Description

      Testcase:

      CREATE TABLE t1 (a tinyint(3), b tinyint(5));
      INSERT INTO t1 VALUES (1,1);
       
      LOCK TABLE t1 write;
      INSERT INTO t1 VALUES (1,2);
      delete from t1 as at;
      UNLOCK TABLES;
       
      drop table t1;
      

      Actual result:

      At line 10: query 'delete from t1 as at' failed: ER_TABLE_NOT_LOCKED (1100): Table 'at' was not locked with LOCK TABLES
      

      Expected result:
      Delete was successful

      Attachments

        Issue Links

          Activity

            People

              lstartseva Lena Startseva
              lstartseva Lena Startseva
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.