Skip to main content
Version: V1.3.0

RELEASE_ALL_LOCKS()

Description​

This function releases all named locks held by the current session and returns the number of locks successfully released.

Syntax​

RELEASE_ALL_LOCKS()

Description​

Parameters​

None.

Return Value​

The number of locks successfully released. If the current session does not hold any locks, the return value is 0.

Examples​

Release all named locks held by the current session.

SELECT RELEASE_ALL_LOCKS();

The return result is as follows:

+---------------------+
| RELEASE_ALL_LOCKS() |
+---------------------+
| 1 |
+---------------------+
1 row in set (0.001 sec)

The return result is 1, indicating that one named lock held by the current session was successfully released.