IS_USED_LOCK()

Overview

Returns the connection identifier of the client session that holds a named user-level lock.

USAGE

IS_USED_LOCK(name)

Argument Name

Description

name

The string argument that is to be checked

DETAILS

IS_USED_LOCK() is a locking function that returns the connection identifier of a named user-level lock if it is locked.

The return value is NULL if the name argument is not a locked user-level lock, otherwise it is a connection identifier.

An error is returned if the name argument is NULL.

SYNONYMS

SCHEMA

PARAMETERS

SKYSQL

PRIVILEGES

EXAMPLES

SELECT IS_USED_LOCK('mylock');
+------------------------+
| IS_USED_LOCK('mylock') |
+------------------------+
|                   NULL |
+------------------------+
SELECT IS_USED_LOCK(NULL);
ERROR 1 (HY000): [24576] Unknown prepared param type: "t_null"
SELECT IS_USED_LOCK(1);
+-----------------+
| IS_USED_LOCK(1) |
+-----------------+
|            NULL |
+-----------------+

ERROR HANDLING

FEATURE INTERACTION

RESPONSES

DIAGNOSIS

ISO 9075:2016

CHANGE HISTORY

Release Series

History

23.09

  • Present starting in MariaDB Xpand 23.09.1.

6.1

  • Present starting in MariaDB Xpand 6.1.0.

6.0

  • Present starting in MariaDB Xpand 6.0.3.

5.3

  • Present starting in MariaDB Xpand 5.3.13.

Release Series

History

6.0

  • Present starting in MariaDB Xpand 6.0.3.

5.3

  • Present starting in MariaDB Xpand 5.3.13.

Release Series

History

6.1

  • Present starting in MariaDB Xpand 6.1.0.

EXTERNAL REFERENCES