Performance Schema user_variables_by_thread Table
This table exposes user-defined variables set within active threads, allowing inspection of custom variables across all sessions.
Column
Description
Example
SET @var = 0;
SELECT * FROM user_variables_by_thread;
+-----------+---------------+----------------+
| THREAD_ID | VARIABLE_NAME | VARIABLE_VALUE |
+-----------+---------------+----------------+
| 11 | var | 0 |
+-----------+---------------+----------------+See Also
Last updated
Was this helpful?

