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

Add RELEASE_ALL_LOCKS function

    XMLWordPrintable

Details

    • Task
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.5.2
    • Locking
    • None

    Description

      After adding support for obtaining multiple named locks through GET_LOCK() in 10.0.2 it is logical to implement RELEASE_ALL_LOCKS(). In MySQL it was done in one release (5.7.5).

      Common task in backend web applications after getting fatal runtime error (SQL or not) is to cancel current transaction and/or unlock tables (if locks are ever used) to be able to process next request and then return some error to customer.

      If somebody uses named locks (e.g. to implement row locking on non-transactional table), then all such locks must be released in case of fatal error too. Earlier, when only single named lock was allowed, one could just make arbitrary GET_LOCK() - RELEASE_LOCK() calls. With multiple locks allowed such task requires programmer to remember all currently obtained locks and release them explicitely.

      So, named locks subsystem is incomplete without RELEASE_ALL_LOCKS function.

      Attachments

        Issue Links

          Activity

            People

              svoj Sergey Vojtovich
              yurasfromch Yuriy Yevtukhov
              Votes:
              1 Vote for this issue
              Watchers:
              6 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.