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

In_use does not increment with LOCK TABLES ... WRITE requests

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 5.5, 10.0, 10.1, 5.5.60, 10.2, 10.3
    • N/A
    • Documentation, Locking
    • CentOS 6 ( 2.6.32-696.23.1.el6.x86_64 )

    Description

      Per the SHOW OPEN TABLES documents (both here and in the MySQL docs) the In_use entry is supposed to show "Number of table locks or lock requests there are for the table." The MySQL docs even go so far as to give the example:

      For example, if one client acquires a lock for a table using LOCK TABLE t1 WRITE, In_use will be 1. If another client issues LOCK TABLE t1 WRITE while the table remains locked, the client will block waiting for the lock, but the lock request causes In_use to be 2.

      But that's not what I'm seeing in my testing. Rather, if I LOCK TABLES ... WRITE on a table then In_use simply shows as 1 until I UNLOCK TABLES, regardless of how many additional LOCK TABLES statements I issue from other clients for the same table.

      The tables I'm testing with are MyISAM tables. If this is a limitation of that particular engine then perhaps the docs just need to be updated.

      Attachments

        Activity

          People

            greenman Ian Gilfillan
            dragle Daniel Ragle
            Votes:
            0 Vote for this issue
            Watchers:
            5 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.