RELEASE_ALL_LOCKS
MariaDB until 10.5.2
RELEASE_ALL_LOCKS was added in MariaDB 10.5.2.
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?