RELEASE_ALL_LOCKS
Release all named locks held by the session. This function frees all user-level locks acquired with GET_LOCK() in the current connection.
Syntax
RELEASE_ALL_LOCKS()Description
Releases all named locks held by the current session. Returns the number of locks released, or 0 if none were held.
Statements using the RELEASE_ALL_LOCKS function are not safe for statement-based replication.
Examples
SELECT RELEASE_ALL_LOCKS(); +---------------------+ | RELEASE_ALL_LOCKS() | +---------------------+ | 0 | +---------------------+ SELECT GET_LOCK('lock1',10); +----------------------+ | GET_LOCK('lock1',10) | +----------------------+ | 1 | +----------------------+ SELECT RELEASE_ALL_LOCKS(); +---------------------+ | RELEASE_ALL_LOCKS() | +---------------------+ | 1 | +---------------------+See Also
This page is licensed: CC BY-SA / Gnu FDL
Last updated
Was this helpful?
.png?alt=media&token=7e7f4c73-9972-4e67-9a1a-74dc18591022&width=260&dpr=4&quality=100&sign=760f8d93&sv=2)
.png?alt=media&token=ee5a45b3-d05b-4bb5-97d0-0f25c5eeb110&width=260&dpr=4&quality=100&sign=12bc3702&sv=2)