Performance Schema user_variables_by_thread Table

MariaDB starting with 10.5.2

The user_variables_by_thread table was added in MariaDB 10.5.2.

The user_variables_by_thread table contains information about user-defined variables and the threads that defined them.

TRUNCATE TABLE cannot be performed on the table.

The table contains the following columns:

Column
Description

Column

Description

THREAD_ID

The thread identifier of the session in which the variable is defined.

VARIABLE_NAME

The variable name, without the leading @ character.

VARIABLE_VALUE

The variable value

Example

SET @var = 0;

SELECT * FROM user_variables_by_thread;
+-----------+---------------+----------------+
| THREAD_ID | VARIABLE_NAME | VARIABLE_VALUE |
+-----------+---------------+----------------+
|        11 | var           | 0              |
+-----------+---------------+----------------+

See Also

This page is licensed: CC BY-SA / Gnu FDL

Last updated

Was this helpful?