As of MySQL 5.7.5, the Performance Schema provides a
user_variables_by_thread table that
exposes user-defined variables. These are variables defined
within a specific session and include a
character preceding the name; see
Section 10.4, “User-Defined Variables”.
contains these columns:
The thread identifier of the session in which the variable is defined.
The variable name, without the leading
The variable value.