MariaDB starting with 10.1.1

The INFORMATION_SCHEMA.SYSTEM_VARIABLES table was introduced in MariaDB 10.1.1

The Information Schema SYSTEM_VARIABLES table shows current values and various metadata of all system variables.

It contains the following columns:

ColumnDescription
VARIABLE NAMESystem variable name.
SESSION VALUESession value of the variable or NULL if the variable only has a global scope.
GLOBAL_VALUEGlobal value of the variable or NULL if the variable only has a session scope.
GLOBAL_VALUE_ORIGINHow the global value was set — a compile-time default, auto-configured by the server, configuration file (or a command line), with the SQL statement.
DEFAULT_VALUECompile-time default value of the variable.
VARIABLE_SCOPEGlobal, session, or session-only.
VARIABLE_TYPEData type of the variable value.
VARIABLE_COMMENTHelp text, usually shown in mysqld --help --verbose.
NUMERIC_MIN_VALUEFor numeric variables — minimal allowed value.
NUMERIC_MAX_VALUEFor numeric variables — maximal allowed value.
NUMERIC_BLOCK_SIZEFor numeric variables — a valid value must be a multiple of the "block size".
ENUM_VALUE_LISTFor ENUM, SET, and FLAGSET variables — the list of recognized values.
READ_ONLYWhether a variable can be set with the SQL statement. Note that many "read only" variables can still be set on the command line.
COMMAND_LINE_ARGUMENTWhether an argument is required when setting the variable on the command line. NULL when a variable can not be set on the command line.

Example

SELECT * FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME='JOIN_BUFFER_SIZE'\G
*************************** 1. row *****************************
        VARIABLE_NAME: JOIN_BUFFER_SIZE
        SESSION_VALUE: 131072
         GLOBAL_VALUE: 131072
  GLOBAL_VALUE_ORIGIN: COMPILE-TIME
        DEFAULT_VALUE: 131072
       VARIABLE_SCOPE: SESSION
        VARIABLE_TYPE: BIGINT UNSIGNED
     VARIABLE_COMMENT: The size of the buffer that is used for joins
    NUMERIC_MIN_VALUE: 128
    NUMERIC_MAX_VALUE: 18446744073709551615
   NUMERIC_BLOCK_SIZE: 128
      ENUM_VALUE_LIST: NULL
            READ_ONLY: NO
COMMAND_LINE_ARGUMENT: REQUIRED

Comments

Comments loading...