MariaDB 10.2.0

The USER_VARIABLES table was introduced in MariaDB 10.2.0 as part of the user_variables plugin.

Contents

  1. Versions
  2. Example

The USER_VARIABLES table is created when the user_variables plugin is enabled, and contains information about user-defined variables.

From MariaDB 10.2.6, the plugin is statically compiled and available by default.

Before MariaDB 10.2.6, the plugin could either be installed by:

--plugin-load = user_variables

in the configuration file, or by running:

INSTALL SONAME 'user_variables';

which returns a warning.

The server then needed to be restarted in order for the table to be created.

It contains the following columns:

ColumnDescription
VARIABLE_NAMEVariable name.
VARIABLE_VALUEVariable value.
VARIABLE_TYPEVariable type.
CHARACTER_SET_NAMECharacter set.

Versions

VersionStatusIntroduced
1.0GammaMariaDB 10.2.6
1.0AlphaMariaDB 10.2.0

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...