RELEASE_ALL_LOCKS
MariaDB until 10.5.2
RELEASE_ALL_LOCKS was added in MariaDB 10.5.2.
Syntax
RELEASE_ALL_LOCKS()
Contents
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
Comments
Comments loading...
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.