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

A 'handler open' places a table metadata read lock on MyISAM table

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 10.3.39
    • N/A
    • Locking
    • None
    • RHEL 8

    Description

      Use a 'HANDLER <table> OPEN' command on one connection, then try a 'LOCK TABLES <table> write' from another connection. The lock will wait for the handler to close as the 'HANDLER <table> OPEN' command has left a lock on the table.

      MariaDB [test]> create table t1 (a int) engine=MyISAM ;
      Query OK, 0 rows affected (0.003 sec)
       
      MariaDB [test]> handler t1 open ;
      Query OK, 0 rows affected (0.001 sec)
       
      MariaDB [test]> select * from information_schema.metadata_lock_info ;
      +-----------+-----------------+---------------+---------------------+--------------+------------+
      | THREAD_ID | LOCK_MODE       | LOCK_DURATION | LOCK_TYPE           | TABLE_SCHEMA | TABLE_NAME |
      +-----------+-----------------+---------------+---------------------+--------------+------------+
      |     17821 | MDL_SHARED_READ | NULL          | Table metadata lock | test         | t1         |
      +-----------+-----------------+---------------+---------------------+--------------+------------+
      1 row in set (0.001 sec)
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            ff234 Fourfront
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.