content_image/722382.jpg
Checks whether the lock named str  is in use (that is, locked). If so, it returns the connection identifier of the client session that holds the lock. Otherwise, it returns NULL . 

This function is unsafe for statement-based replication. A warning is logged if you use this function when binlog_format  is set to STATEMENT . 

• RELEASE_ALL_LOCKS() 

Releases all named locks held by the current session and returns the number of locks released (0 if there were none) 

This function is unsafe for statement-based replication. A warning is logged if you use this function when binlog_format  is set to STATEMENT . 

• RELEASE_LOCK( str 

Releases the lock named by the string str  that was obtained with GET_LOCK() . Returns 1  if the lock was released, 0  if the lock was not established by this thread (in which case the lock is not released), and NULL  if the named lock did not exist. The lock does not exist if it was never obtained by a call to GET_LOCK()  or if it has previously been released. 

The DO  statement is convenient to use with RELEASE_LOCK() . See Section 13.2.3, “DO Statement” . 

This function is unsafe for statement-based replication. A warning is logged if you use this function when binlog_format  is set to STATEMENT . 

## 12.16 Information Functions 

<img src='content_image/722382.jpg'>

