Information Schema USER_VARIABLES Table
You are viewing an old version of this article. View
the current version here.
MariaDB 10.2.0
The USER_VARIABLES table was introduced in MariaDB 10.2.0 as part of the user_variables plugin.
The USER_VARIABLES table is created when the user_variables plugin is enabled, and contains information about user-defined variables.
The server needs to be restarted in order for the plugin to load, so it can either be installed by:
--plugin-load = user_variables
in the configuration file, or by running:
INSTALL SONAME 'user_variables';
which will return a warning, and then restarting the server.
It has the following columns:
Column | Description |
---|---|
VARIABLE_NAME | Variable name. |
VARIABLE_VALUE | Variable value. |
VARIABLE_TYPE | Variable type. |
CHARACTER_SET_NAME | Character set. |
Example
SELECT * FROM INFORMATION_SCHEMA.USER_VARIABLES ORDER BY VARIABLE_NAME; +---------------+----------------+---------------+--------------------+ | VARIABLE_NAME | VARIABLE_VALUE | VARIABLE_TYPE | CHARACTER_SET_NAME | +---------------+----------------+---------------+--------------------+ | var | 0 | INT | utf8 | | var2 | abc | VARCHAR | utf8 | +---------------+----------------+---------------+--------------------+
Comments
Comments loading...
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.