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
No parameters.
Return value
Returns the number of locks successfully released. If the current session does not hold any locks, the return value is 0.
Examples
Releases all named locks held by the current session.
obclient [(none)]> SELECT RELEASE_ALL_LOCKS();
The return result is as follows:
+---------------------+
| RELEASE_ALL_LOCKS() |
+---------------------+
| 1 |
+---------------------+
1 row in set
A return value of 1 indicates that the named lock held by the current session was successfully released.