Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
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
- relates to
-
MDEV-21828 Document RELEASE_ALL_LOCKS
- Closed