Name
IS_FREE_LOCK( )
Synopsis
IS_FREE_LOCK(string
)
Use
this function to determine if the name of the lock given in
parentheses is free and available as a lock name. It returns 1 if the
lock name is free; 0 if it’s not free. It returns
NULL if there is an error. This function is available as of Version
4.0.2 of MySQL. Locks are created by GET_LOCK( )
.
SELECT IS_FREE_LOCK('my_lock'); +-------------------------+ | IS_FREE_LOCK('my_lock') | +-------------------------+ | 0 | +-------------------------+
Get MySQL in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.