User Variables Plugin
The User Variables plugin adds the USER_VARIABLES table to the Information Schema, allowing users to inspect defined user variables and their values.
Viewing
Flushing User-Defined Variables
Examples
SET @v1 = 0;
SET @v2 = 'abc';
SET @v3 = CAST(123 AS CHAR(5));
SHOW USER_VARIABLES;
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| v3 | 123 |
| v2 | abc |
| v1 | 0 |
+---------------+-------+
SELECT * FROM information_schema.USER_VARIABLES ORDER BY VARIABLE_NAME;
+---------------+----------------+---------------+--------------------+
| VARIABLE_NAME | VARIABLE_VALUE | VARIABLE_TYPE | CHARACTER_SET_NAME |
+---------------+----------------+---------------+--------------------+
| v1 | 0 | INT | latin1 |
| v2 | abc | VARCHAR | utf8 |
| v3 | 123 | VARCHAR | utf8 |
+---------------+----------------+---------------+--------------------+
FLUSH USER_VARIABLES;
SELECT * FROM information_schema.USER_VARIABLES ORDER BY VARIABLE_NAME;
Empty set (0.000 sec)Installing the Plugin
Uninstalling the Plugin
Options
user_variables
user_variablesLast updated
Was this helpful?

