CONNECTION_ID()

Overview

Returns the thread ID for the given connection.

USAGE

CONNECTION_ID()

DETAILS

CONNECTION_ID() is an information function that returns the connection ID for the current connection.

The returned value is unique for each of the currently connected clients.

The returned value is the same as the ID column of the INFORMATION_SCHEMA.PROCESSLIST table and the same as the Id column of SHOW PROCESSLIST.

SYNONYMS

SCHEMA

PARAMETERS

SKYSQL

PRIVILEGES

EXAMPLES

SELECT CONNECTION_ID();
+-----------------+
| CONNECTION_ID() |
+-----------------+
|       123456789 |
+-----------------+

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