IS_FREE_LOCK()
This page is part of MariaDB's Documentation.
The parent of this page is: Functions for MariaDB Xpand
Topics on this page:
Overview
Returns a boolean to indicate if a named user-level lock is unlocked.
USAGE
IS_FREE_LOCK(name)
Argument Name | Description |
---|---|
| The string argument that is checked |
DETAILS
IS_FREE_LOCK()
is a locking function that returns a boolean to indicate if the user-level lock represented by name
is not locked.
The return value is 1
if the name
argument is not a locked user-level lock, otherwise it is 0
.
An error is returned if the name
argument is NULL
.
EXAMPLES
SELECT IS_FREE_LOCK('mylock');
+------------------------+
| IS_FREE_LOCK('mylock') |
+------------------------+
| 1 |
+------------------------+
SELECT IS_FREE_LOCK(NULL);
ERROR 1 (HY000): [24576] Unknown prepared param type: "t_null"
SELECT IS_FREE_LOCK(1);
+-----------------+
| IS_FREE_LOCK(1) |
+-----------------+
| 1 |
+-----------------+