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

RENAME tables locked with a write lock

    XMLWordPrintable

Details

    • Task
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • None

    Description

      In MySQL 8, it's possible to use RENAME on a table that is locked with a write lock.
      https://dev.mysql.com/doc/refman/8.0/en/rename-table.html

      In MySQL 8, the following would work:

      CREATE TABLE t (id INT);
      LOCK TABLE t WRITE;
      RENAME TABLE t TO t2;
      

      In MariaDB, this fails with:

      RENAME TABLE t TO t2;
      ERROR 1192 (HY000): Can't execute the given command because you have active locked tables or an active transaction
      

      See also https://stackoverflow.com/questions/36202298/renaming-a-locked-table

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              greenman Ian Gilfillan
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.