All pages
Powered by GitBook
Couldn't generate the PDF for 130 pages, generation stopped at 100.
Extend with 50 more pages.
1 of 100

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Information Schema PARAMETERS Table

The Information Schema PARAMETERS table stores information about parameters for stored procedures and functions, including data types and modes.

The Information Schema PARAMETERS table stores information about stored procedures and stored functions parameters.

It contains the following columns:

Column
Description

SPECIFIC_CATALOG

Information from this table is similar to that found in the param_list column in the table, and the output of the and statements.

To obtain information about the routine itself, you can query the .

This page is licensed: CC BY-SA / Gnu FDL

Information Schema INNODB_METRICS Table

The Information Schema INNODB_METRICS table contains a wide range of low-level performance metrics and counters for the InnoDB storage engine.

The Information Schema INNODB_METRICS table contains a list of useful InnoDB performance metrics. Each row in the table represents an instrumented counter that can be stopped, started and reset, and which can be grouped together by module.

The PROCESS privilege is required to view the table.

It has the following columns:

Column
Description

Note: In MariaDB 10.4 and earlier the ENABLED column was called STATUS.

Most of the counters are disabled by default. To enable them, use the system variable. You can either enable a variable by its name, for example:

or enable a number of counters grouped by module. The SUBSYSTEM field indicates which counters are grouped together, but the following module names need to be used:

Module Name
Subsystem Field

There are four counters in the icp subsystem:

To enable them all, use the associated module name from the table above, module_icp.

The % wildcard, used to represent any number of characters, can also be used when naming counters, for example:

To disable counters, use the system variable, using the same naming rules as described above for enabling.

Counter status is not persistent, and will be reset when the server restarts. It is possible to use the options on the command line, or the innodb_monitor_enable option only in a configuration file.

Counters can also be reset. Resetting sets all the *_COUNT_RESET values to zero, while leaving the *_COUNT values, which perform counts since the counter was enabled, untouched. Resetting is performed with the (for individual counters) and (for all counters) system variables.

From MariaDB 10.6, the interface was simplified by removing the following variables:

  • buffer_LRU_batches_flush

  • buffer_LRU_batch_flush_pages

  • buffer_LRU_batches_evict

  • buffer_LRU_batch_evict_pages

And by making the following reflect the status variables:

  • buffer_LRU_batch_flush_total_pages:

  • buffer_LRU_batch_evict_total_pages:

The intention is to eventually remove the interface entirely (see ).

This page is licensed: CC BY-SA / Gnu FDL

Information Schema

Query information_schema.tables in MariaDB Server. This system table provides metadata about all tables in the databases, including their names, types, storage engines, and other crucial properties.

The information_schema is a standard-compliant database available in every MariaDB instance, providing metadata about all other databases, tables, columns, and server-level objects.

Information Schema Tables

Provides a comprehensive list of all tables available within the information_schema, including their purpose and the metadata they provide.

TIME_MS column in INFORMATION_SCHEMA.PROCESSLIST

Details the TIME_MS column in the INFORMATION_SCHEMA.PROCESSLIST table, which provides high-resolution timing for active server processes.

Average value since being enabled.

COUNT_RESET

Count since last being reset.

MAX_COUNT_RESET

Maximum value since last being reset.

MIN_COUNT_RESET

Minimum value since last being reset.

AVG_COUNT_RESET

Average value since last being reset.

TIME_ENABLED

Time last enabled.

TIME_DISABLED

Time last disabled

TIME_ELAPSED

Time since enabled

TIME_RESET

Time last reset.

ENABLED

1 if enabled, 0 otherwise

TYPE

Item type; one of counter, value, status_counter, set_owner, set_member.

COMMENT

Counter description.

buffer_page_io

module_os

os

module_trx

transaction

module_purge

purge

module_compress

compression

module_file

file_system

module_index

index

module_adaptive_hash

adaptive_hash_index From , if is disabled (the default), adaptive_hash_index will not be updated.

module_ibuf_system

change_buffer

module_srv

server

module_ddl

ddl

module_dml

dml

module_log

recovery

module_icp

icp

NAME

Unique counter name.

SUBSYSTEM

InnoDB subsystem. See below for the matching module to use to enable/disable monitoring this subsystem with the innodb_monitor_enable and innodb_monitor_disable system variables.

COUNT

Count since being enabled.

MAX_COUNT

Maximum value since being enabled.

MIN_COUNT

Minimum value since being enabled.

SET GLOBAL innodb_monitor_enable = icp_match;

module_metadata

metadata

module_lock

lock

module_buffer

buffer

SELECT NAME, SUBSYSTEM FROM INNODB_METRICS WHERE SUBSYSTEM='icp';
+------------------+-----------+
| NAME             | SUBSYSTEM |
+------------------+-----------+
| icp_attempts     | icp       |
| icp_no_match     | icp       |
| icp_out_of_range | icp       |
| icp_match        | icp       |
+------------------+-----------+
SET GLOBAL innodb_monitor_enable = module_icp;
SET GLOBAL innodb_monitor_enable = 'buffer%'
SELECT name,subsystem,type,comment FROM INFORMATION_SCHEMA.INNODB_METRICS\G
*************************** 1. row ***************************
     name: metadata_table_handles_opened
subsystem: metadata
     type: counter
  comment: Number of table handles opened
*************************** 2. row ***************************
     name: lock_deadlocks
subsystem: lock
     type: value
  comment: Number of deadlocks
*************************** 3. row ***************************
     name: lock_timeouts
subsystem: lock
     type: value
  comment: Number of lock timeouts
*************************** 4. row ***************************
     name: lock_rec_lock_waits
subsystem: lock
     type: counter
  comment: Number of times enqueued into record lock wait queue
*************************** 5. row ***************************
     name: lock_table_lock_waits
subsystem: lock
     type: counter
  comment: Number of times enqueued into table lock wait queue
*************************** 6. row ***************************
     name: lock_rec_lock_requests
subsystem: lock
     type: counter
  comment: Number of record locks requested
*************************** 7. row ***************************
     name: lock_rec_lock_created
subsystem: lock
     type: counter
  comment: Number of record locks created
*************************** 8. row ***************************
     name: lock_rec_lock_removed
subsystem: lock
     type: counter
  comment: Number of record locks removed from the lock queue
*************************** 9. row ***************************
     name: lock_rec_locks
subsystem: lock
     type: counter
  comment: Current number of record locks on tables
*************************** 10. row ***************************
     name: lock_table_lock_created
subsystem: lock
     type: counter
  comment: Number of table locks created

...

*************************** 207. row ***************************
     name: icp_attempts
subsystem: icp
     type: counter
  comment: Number of attempts for index push-down condition checks
*************************** 208. row ***************************
     name: icp_no_match
subsystem: icp
     type: counter
  comment: Index push-down condition does not match
*************************** 209. row ***************************
     name: icp_out_of_range
subsystem: icp
     type: counter
  comment: Index push-down condition out of range
*************************** 210. row ***************************
     name: icp_match
subsystem: icp
     type: counter
  comment: Index push-down condition matches

Enabling and Disabling Counters

Resetting Counters

Simplification from MariaDB 10.6

Examples

innodb_monitor_enable
innodb_monitor_disable
innodb_monitor_reset
innodb_monitor_reset_all
innodb_buffer_pool_pages_LRU_flushed
innodb_buffer_pool_pages_LRU_freed
MDEV-15706
spinner

AVG_COUNT

module_buf_page

Always def.

SPECIFIC_SCHEMA

Database name containing the stored routine parameter.

SPECIFIC_NAME

Stored routine name.

ORDINAL_POSITION

Ordinal position of the parameter, starting at 1. 0 for a function RETURNS clause.

PARAMETER_DEFAULT

Displays default values for stored routine parameters.

PARAMETER_MODE

One of IN, OUT, INOUT or NULL for RETURNS.

PARAMETER_NAME

Name of the parameter, or NULL for RETURNS.

DATA_TYPE

The column's data type.

CHARACTER_MAXIMUM_LENGTH

Maximum length.

CHARACTER_OCTET_LENGTH

Same as the CHARACTER_MAXIMUM_LENGTH except for multi-byte character sets.

NUMERIC_PRECISION

For numeric types, the precision (number of significant digits) for the column. NULL if not a numeric field.

NUMERIC_SCALE

For numeric types, the scale (significant digits to the right of the decimal point). NULL if not a numeric field.

DATETIME_PRECISION

Fractional-seconds precision, or NULL if not a time data type.

CHARACTER_SET_NAME

Character set if a non-binary string data type, otherwise NULL.

COLLATION_NAME

Collation if a non-binary string data type, otherwise NULL.

DTD_IDENTIFIER

Description of the data type.

ROUTINE_TYPE

PROCEDURE or FUNCTION.

PARAMETER_DEFAULT

Default parameter value. From .

SELECT * FROM information_schema.PARAMETERS
LIMIT 1 \G
********************** 1. row **********************
        SPECIFIC_CATALOG: def
         SPECIFIC_SCHEMA: accounts
           SPECIFIC_NAME: user_counts
        ORDINAL_POSITION: 1
          PARAMETER_MODE: IN
          PARAMETER_NAME: user_order
               DATA_TYPE: varchar
CHARACTER_MAXIMUM_LENGTH: 255
  CHARACTER_OCTET_LENGTH: 765
       NUMERIC_PRECISION: NULL
           NUMERIC_SCALE: NULL
      DATETIME_PRECISION: NULL
      CHARACTER_SET_NAME: utf8
          COLLATION_NAME: utf8_general_ci
          DTD_IDENTIFIER: varchar(255)
            ROUTINE_TYPE: PROCEDURE
       PARAMETER_DEFAULT: NULL

Example

mysql.proc
SHOW CREATE PROCEDURE
SHOW CREATE FUNCTION
Information Schema ROUTINES table
spinner

TIME_MS column in INFORMATION_SCHEMA.PROCESSLIST

The TIME_MS column in the INFORMATION_SCHEMA.PROCESSLIST table displays the time a thread has been in its current state in milliseconds, offering higher precision than the standard TIME column.

In MariaDB, an extra column TIME_MS was added to the INFORMATION_SCHEMA.PROCESSLIST table. This column shows the same information as the column 'TIME', but in units of milliseconds with microsecond precision (the unit and precision of theTIME column is one second).

For details about microseconds support in MariaDB, see microseconds in MariaDB.

The value displayed in the TIME andTIME_MS columns is the period of time that the given thread has been in its current state. Thus, it can be used to check for example how long a thread has been executing the current query, or for how long it has been idle.

Note that as a difference to MySQL, in MariaDB the TIME column (and also the TIME_MS column) are not affected by any setting of . This means that it can be reliably used also for threads that change @TIMESTAMP (such as the SQL thread). See also .

As a consequence of this, the TIME column ofSHOW FULL PROCESSLIST andINFORMATION_SCHEMA.PROCESSLIST cannot be used to determine if a slave is lagging behind. For this, use instead theSeconds_Behind_Master column in the output of .

The addition of the TIME_MS column is based on the microsec_process patch, developed by .

This page is licensed: CC BY-SA / Gnu FDL

Information Schema Tables

Query information_schema.tables in MariaDB Server. These system tables provides metadata about all tables in the databases, including their names, types, storage engines, and other crucial properties.

@TIMESTAMP
replication
MySQL Bug #22047
SHOW SLAVE STATUS
Percona
spinner
SELECT id, TIME, time_ms, command, state FROM
   information_schema.processlist, (SELECT sleep(2)) t;
+----+------+----------+---------+-----------+
| id | time | time_ms  | command | state     |
+----+------+----------+---------+-----------+
| 37 |    2 | 2000.493 | Query   | executing |
+----+------+----------+---------+-----------+
innodb_adaptive_hash_index

Information Schema APPLICABLE_ROLES Table

The Information Schema APPLICABLE_ROLES table shows the role authorizations that the current user may use, detailing grantable and default status.

The Information Schema APPLICABLE_ROLES table shows the role authorizations that the current user may use.

It contains the following columns:

Column
Description

GRANTEE

Account that the role was granted to.

The current role is in the Information Schema table.

This page is licensed: CC BY-SA / Gnu FDL

Information Schema ALL_PLUGINS Table

The Information Schema ALL_PLUGINS table contains information about server plugins, whether installed or not, providing a superset of SHOW PLUGINS SONAME.

The ALL_PLUGINS table contains information about , whether installed or not.

It contains the following columns:

Column
Description

Information Schema InnoDB Tables

These system tables provide detailed metadata about InnoDB tables, including their structure, storage, and other crucial properties for analysis.

ROLE_NAME

Name of the role.

IS_GRANTABLE

Whether the role can be granted or not.

IS_DEFAULT

Whether the role is the user's default role or not

Example

ENABLED_ROLES
spinner

Information Schema FILE_KEY_MANAGEMENT_KEYS Table

The Information Schema FILES table provides information about files stored in tablespaces, such as those used by the InnoDB storage engine.

This table is available from MariaDB Enterprise Server 11.8.

The INFORMATION_SCHEMA.FILE_KEY_MANAGEMENT_KEYS table lists key ID and latest key version for keys managed by the file_key_management plugin. The table's contents can be queried directly, or viewed using the SHOW FILE_KEY_MANAGEMENT_KEYS statement.

You can also can reload the data from the key file into the cache by issuing this statement:

FLUSH FILE_KEY_MANAGEMENT_KEYS

This functionality is provided by the file_key_management plugin.

This Information Schema table allows to query the key numbers and key versions which are currently in the cache (which can be different to the file). It also allows to verify which keys are in use when joining the table with INNODB_TABLESPACES_ENCRYPTION.

SELECT * FROM information_schema.APPLICABLE_ROLES;
+----------------+-------------+--------------+------------+
| GRANTEE        | ROLE_NAME   | IS_GRANTABLE | IS_DEFAULT |
+----------------+-------------+--------------+------------+
| root@localhost | journalist  | YES          | NO         |
| root@localhost | staff       | YES          | NO         |
| root@localhost | dd          | YES          | NO         |
| root@localhost | dog         | YES          | NO         |
+----------------+-------------+--------------+------------+

PLUGIN_VERSION

Version from the plugin's general type descriptor.

PLUGIN_STATUS

Plugin status, one of ACTIVE, INACTIVE, DISABLED, DELETED or NOT INSTALLED.

PLUGIN_TYPE

Plugin type; STORAGE ENGINE, INFORMATION_SCHEMA, AUTHENTICATION, REPLICATION, DAEMON or AUDIT.

PLUGIN_TYPE_VERSION

Version from the plugin's type-specific descriptor.

PLUGIN_LIBRARY

Plugin's shared object file name, located in the directory specified by the system variable, and used by the and statements. NULL if the plugin is complied in and cannot be uninstalled.

PLUGIN_LIBRARY_VERSION

Version from the plugin's API interface.

PLUGIN_AUTHOR

Author of the plugin.

PLUGIN_DESCRIPTION

Description.

PLUGIN_LICENSE

Plugin's licence.

LOAD_OPTION

How the plugin was loaded; one of OFF, ON, FORCE or FORCE_PLUS_PERMANENT. See .

PLUGIN_MATURITY

Plugin's maturity level; one of Unknown, Experimental, Alpha, Beta,'Gamma, and Stable.

PLUGIN_AUTH_VERSION

Plugin's version as determined by the plugin author. An example would be '0.99 beta 1'.

It provides a superset of the information shown by the SHOW PLUGINS SONAME statement, as well as the information_schema.PLUGINS table. For specific information about storage engines (a particular type of plugin), see the Information Schema ENGINES table and the SHOW ENGINES statement.

The table is not a standard Information Schema table, and is a MariaDB extension.

This page is licensed: CC BY-SA / Gnu FDL

PLUGIN_NAME

Description

Information Schema
server plugins

Name of the plugin.

SELECT * FROM information_schema.all_plugins\G
*************************** 1. row ***************************
           PLUGIN_NAME: binlog
        PLUGIN_VERSION: 1.0
         PLUGIN_STATUS: ACTIVE
           PLUGIN_TYPE: STORAGE ENGINE
   PLUGIN_TYPE_VERSION: 100314.0
        PLUGIN_LIBRARY: NULL
PLUGIN_LIBRARY_VERSION: NULL
         PLUGIN_AUTHOR: MySQL AB
    PLUGIN_DESCRIPTION: This is a pseudo storage engine to represent the binlog in a transaction
        PLUGIN_LICENSE: GPL
           LOAD_OPTION: FORCE
       PLUGIN_MATURITY: Stable
   PLUGIN_AUTH_VERSION: 1.0
*************************** 2. row ***************************
           PLUGIN_NAME: mysql_native_password
        PLUGIN_VERSION: 1.0
         PLUGIN_STATUS: ACTIVE
           PLUGIN_TYPE: AUTHENTICATION
   PLUGIN_TYPE_VERSION: 2.1
        PLUGIN_LIBRARY: NULL
PLUGIN_LIBRARY_VERSION: NULL
         PLUGIN_AUTHOR: R.J.Silk, Sergei Golubchik
    PLUGIN_DESCRIPTION: Native MySQL authentication
        PLUGIN_LICENSE: GPL
           LOAD_OPTION: FORCE
       PLUGIN_MATURITY: Stable
   PLUGIN_AUTH_VERSION: 1.0
*************************** 3. row ***************************
           PLUGIN_NAME: mysql_old_password
        PLUGIN_VERSION: 1.0
         PLUGIN_STATUS: ACTIVE
           PLUGIN_TYPE: AUTHENTICATION
   PLUGIN_TYPE_VERSION: 2.1
        PLUGIN_LIBRARY: NULL
PLUGIN_LIBRARY_VERSION: NULL
         PLUGIN_AUTHOR: R.J.Silk, Sergei Golubchik
    PLUGIN_DESCRIPTION: Old MySQL-4.0 authentication
        PLUGIN_LICENSE: GPL
           LOAD_OPTION: FORCE
       PLUGIN_MATURITY: Stable
   PLUGIN_AUTH_VERSION: 1.0
...
*************************** 104. row ***************************
           PLUGIN_NAME: WSREP_MEMBERSHIP
        PLUGIN_VERSION: 1.0
         PLUGIN_STATUS: NOT INSTALLED
           PLUGIN_TYPE: INFORMATION SCHEMA
   PLUGIN_TYPE_VERSION: 100314.0
        PLUGIN_LIBRARY: wsrep_info.so
PLUGIN_LIBRARY_VERSION: 1.13
         PLUGIN_AUTHOR: Nirbhay Choubey
    PLUGIN_DESCRIPTION: Information about group members
        PLUGIN_LICENSE: GPL
           LOAD_OPTION: OFF
       PLUGIN_MATURITY: Stable
   PLUGIN_AUTH_VERSION: 1.0
*************************** 105. row ***************************
           PLUGIN_NAME: WSREP_STATUS
        PLUGIN_VERSION: 1.0
         PLUGIN_STATUS: NOT INSTALLED
           PLUGIN_TYPE: INFORMATION SCHEMA
   PLUGIN_TYPE_VERSION: 100314.0
        PLUGIN_LIBRARY: wsrep_info.so
PLUGIN_LIBRARY_VERSION: 1.13
         PLUGIN_AUTHOR: Nirbhay Choubey
    PLUGIN_DESCRIPTION: Group view information
        PLUGIN_LICENSE: GPL
           LOAD_OPTION: OFF
       PLUGIN_MATURITY: Stable

Example

spinner

Information Schema SLAVE_STATUS Table

The Information Schema SLAVE_STATUS table displays status information for the replication slave threads, similar to SHOW SLAVE STATUS.

This table is available as of MariaDB .

The Information Schema SLAVE_STATUS table contains replica status information, similar to SHOW REPLICA STATUS.

See SHOW REPLICA STATUS for column descriptions.

This page is licensed: CC BY-SA / Gnu FDL

spinner

Information Schema THREAD_POOL_WAITS Table

The Information Schema THREAD_POOL_WAITS table lists the number of times threads in the thread pool have waited for various events.

This table is available from MariaDB 10.5.

The table provides wait counters for the thread pool, and contains the following columns:

Column
Description

REASON

name of the reason for waiting, e.g. ROW_LOCK, DISKIO, NET ...

COUNT

This page is licensed: CC BY-SA / Gnu FDL

Information Schema WSREP_CERT_KEYS_HISTORY

The Information Schema WSREP_CERT_KEYS_HISTORY table logs a history of certification keys for recently processed Galera transactions.

This table is used in .

This table is available as of MariaDB Enterprise Server 11.8.

This table contains certification key information history for Galera threads. See the WSREP_CERT_KEYS documentation for details.

Information Schema WSREP_CONNECTIONS

The Information Schema WSREP_CONNECTIONS table shows active connections to the Galera Cluster, primarily used for debugging cluster membership.

This table is used in .

This table is available as of MariaDB Enterprise Server 11.8.

This table contains active Galera connections on queried nodes in the cluster. Example output:

MariaDB [(none)]> SELECT * FROM information_schema.wsrep_connections;
+-----------------+-------------------+-----------------+-----------------+------------------------+---------------------------------------------------+------------------------------------------------------+---------------------+
| connection_id   | connection_scheme | local_address   | remote_address  | cipher                 | certificate_subject                               | certificate_issuer                                   | certificate_version |
+-----------------+-------------------+-----------------+-----------------+------------------------+---------------------------------------------------+------------------------------------------------------+---------------------+
| 136018124822096 | ssl               | 127.0.0.1:19033 | 127.0.0.1:59010 | TLS_AES_256_GCM_SHA384 | /C=FI/ST=Helsinki/L=Helsinki/O=Galera/CN=galera.1 | /C=FI/ST=Helsinki/L=Helsinki/O=Galera/CN=galera.root | TLSv1.3             |
| 136018124966656 | ssl               | 127.0.0.1:49650 | 127.0.0.1:19039 | TLS_AES_256_GCM_SHA384 | /C=FI/ST=Helsinki/L=Helsinki/O=Galera/CN=galera.1 | /C=FI/ST=Helsinki/L=Helsinki/O=Galera/CN=galera.root | TLSv1.3             |
+-----------------+-------------------+-----------------+-----------------+------------------------+---------------------------------------------------+------------------------------------------------------+---------------------+
2 rows in set (0.004 sec)

Information Schema WSREP_THD_STATE_HISTORY

The Information Schema WSREP_THD_STATE_HISTORY table maintains a history of thread states for Galera replication, aiding in post-incident analysis.

This table is used in .

This table is available as of MariaDB Enterprise Server 11.8.

This table contains execution state information history for Galera threads. See the WSREP_THD_STATE documentation for details.

Information Schema CHARACTER_SETS Table

The Information Schema CHARACTER_SETS table contains a list of supported character sets, their default collations, and maximum lengths.

The CHARACTER_SETS table contains a list of supported , their default collations and maximum lengths.

It contains the following columns:

Column
Description

Information Schema ENABLED_ROLES Table

The Information Schema ENABLED_ROLES table lists all roles that are currently enabled for the current session, including nested roles.

The ENABLED_ROLES table shows the enabled for the current session.

It contains the following column:

Column
Description

Information Schema HASHICORP_KEY_MANAGEMENT_CACHE Table

The Information Schema HASHICORP_KEY_MANAGEMENT_CACHE table provides information about keys managed by the HashiCorp Key Management plugin.

The INFORMATION_SCHEMA.HASHICORP_KEY_MANAGEMENT_CACHE table lists the Key ID and the latest Key Version for keys managed by the . The table's contents can be queried directly, or viewed using the SHOW HASHICORP_KEY_MANAGEMENT_CACHE statement.

You can reload the data from the Vault server into the cache by issuing this statement:

This functionality is provided by the HashiCorp Key Management plugin.

This Information Schema table allows you to query the key numbers and key versions which are currently in the cache.

The table contains the following columns:

Information Schema GLOBAL_STATUS and SESSION_STATUS Tables

The GLOBAL_STATUS and SESSION_STATUS tables store the global and session values of server status variables, respectively.

The GLOBAL_STATUS and SESSION_STATUS tables store a record of all and their global and session values respectively. This is the same information as displayed by the commands SHOW GLOBAL STATUS and SHOW SESSION STATUS.

They contain the following columns:

Column
Description

Information Schema GLOBAL_VARIABLES and SESSION_VARIABLES Tables

The GLOBAL_VARIABLES and SESSION_VARIABLES tables store the global and session values of all system variables, respectively.

The GLOBAL_VARIABLES and SESSION_VARIABLES tables stores a record of all and their global and session values respectively. This is the same information as displayed by the commands SHOW GLOBAL VARIABLES and SHOW SESSION VARIABLES.

It contains the following columns:

Column
Description

Information Schema KEY_PERIOD_USAGE Table

The Information Schema KEY_PERIOD_USAGE table describes how keys reference application-time periods, detailing constraints involving those periods.

The KEY_PERIOD_USAGE table shows information about .

It contains the following columns:

Column
Description

Information Schema OPTIMIZER_TRACE Table

The Information Schema OPTIMIZER_TRACE table contains details about the optimizer's decision-making process for the last executed query.

The OPTIMIZER_TRACE table contains information.

It contains the following columns:

Column
Description

Information Schema PERIODS Table

The Information Schema PERIODS table provides information about Application-Time Periods, detailing the start and end columns for system versioning.

The PERIODS table provides information about .

It contains the following columns:

Column
Description

Information Schema QUERY_RESPONSE_TIME Table

The Information Schema QUERY_RESPONSE_TIME table displays the distribution of query execution times, helping to identify performance bottlenecks.

The QUERY_RESPONSE_TIME table contains information about queries that take a long time to execute . It is only available if the plugin has been installed.

It contains the following columns:

Column
Description

Information Schema REFERENTIAL_CONSTRAINTS Table

The Information Schema REFERENTIAL_CONSTRAINTS table contains metadata about foreign keys, including update and delete rules.

The REFERENTIAL_CONSTRAINTS table contains information about . The single columns are listed in the table.

It has the following columns:

Column
Description

Information Schema SPIDER_ALLOC_MEM Table

The Information Schema SPIDER_ALLOC_MEM table tracks memory allocation for the Spider storage engine, aiding in resource monitoring.

The SPIDER_ALLOC_MEM table is installed along with the storage engine. It shows information about Spider's memory usage.

It contains the following columns:

Column
Description

Information Schema TABLE_CONSTRAINTS Table

The Information Schema TABLE_CONSTRAINTS table describes constraints on tables, such as PRIMARY KEY, UNIQUE, and FOREIGN KEY constraints.

The TABLE_CONSTRAINTS table contains information about tables that have .

It has the following columns:

Column
Description

Information Schema TABLE_PRIVILEGES Table

The Information Schema TABLE_PRIVILEGES table lists privileges granted specifically at the table level.

The TABLE_PRIVILEGES table contains table privilege information derived from the grant table.

It has the following columns:

Column
Description

Information Schema THREAD_POOL_GROUPS Table

The Information Schema THREAD_POOL_GROUPS table provides details about the thread groups in the thread pool, including active thread counts.

The table provides information about groups, and contains the following columns:

Column
Description

Information Schema THREAD_POOL_QUEUES Table

The Information Schema THREAD_POOL_QUEUES table shows the status of the queues within the thread pool, detailing pending connections.

The table provides information about queues, and contains the following columns:

Column
Description

Information Schema THREAD_POOL_STATS Table

The Information Schema THREAD_POOL_STATS table provides performance statistics for the thread pool, such as thread creation and efficiency.

The table provides performance counter information for the , and contains the following columns:

Column
Description

Information Schema USER_PRIVILEGES Table

The Information Schema USER_PRIVILEGES table lists global privileges granted to user accounts, derived from the mysql.user table.

The USER_PRIVILEGES table contains global user privilege information derived from the grant table.

It contains the following columns:

Column
Description

Information Schema USERS Table

The Information Schema USERS table lists user accounts, including whether they are global or local, and details about their password expiration.

The USERS table contains information about users, , and the limits set by . Unprivileged users can access their own data, which is different to what provides.

It contains the following columns:

Column
Description

Information Schema WSREP_STATUS Table

The Information Schema WSREP_STATUS table provides a comprehensive view of the Galera Cluster status variables, similar to SHOW STATUS LIKE 'wsrep%'

The WSREP_STATUS table makes node cluster status information available through the . The same information can be returned using the statement. Only users with the privilege can access information from this table.

The WSREP_STATUS table is part of the .

This page is licensed: CC BY-SA / Gnu FDL

Information Schema WSREP_THD_STATE

The Information Schema WSREP_THD_STATE table displays the internal state of Galera threads, helping to monitor replication progress and locking.

This table contains execution state information for Galera threads, and has these columns:

  • ID - Thread ID

  • OS_THREAD_ID - Os thread ID

Information Schema INNODB_CHANGED_PAGES Table

The Information Schema INNODB_CHANGED_PAGES table lists pages that have been modified since a specific checkpoint.

The INNODB_CHANGED_PAGES Table contains data about modified pages from the bitmap file. It is updated at checkpoints by the log tracking thread parsing the log, so does not contain real-time data.

The number of records is limited by the value of the system variable.

The PROCESS is required to view the table.

It has the following columns:

Column

Information Schema INNODB_FT_BEING_DELETED Table

This table is used only during an OPTIMIZE TABLE operation to store the document IDs of rows currently being deleted from an InnoDB FULLTEXT index.

The INNODB_FT_BEING_DELETED table is only used while document ID's in the related are being removed from an InnoDB while an is underway. At all other times the table will be empty.

The SUPER is required to view the table, and it also requires the system variable to be set.

It has the following column:

Column
Description

Information Schema INNODB_FT_DELETED Table

The INNODB_FT_DELETED table lists document IDs of rows that have been deleted from an InnoDB FULLTEXT index but not yet removed from the index files.

The INNODB_FT_DELETED table contains rows that have been deleted from an InnoDB . This information is then used to filter results on subsequent searches, removing the need to expensively reorganise the index each time a row is deleted.

The fulltext index is then only reorganized when an statement is underway. The related table contains rows being deleted while an OPTIMIZE TABLE is in the process of running.

The SUPER is required to view the table, and it also requires the system variable to be set.

It has the following column:

Information Schema INNODB_SYS_DATAFILES Table

The INNODB_SYS_DATAFILES table, now deprecated and removed, was intended to provide metadata for InnoDB tablespace paths.

The INNODB_SYS_DATAFILES table contains information about InnoDB datafile paths. It was intended to provide metadata for tablespaces inside InnoDB tables, which was never implemented in MariaDB and was removed in . The PROCESS was required to view the table.

It contains the following columns:

Column
Description

how often a wait for this specific reason has happened so far

spinner
plugin_dir
INSTALL PLUGIN
UNINSTALL PLUGIN
Installing Plugins
MariaDB Galera Cluster
MariaDB Galera Cluster
MariaDB Galera Cluster

CONSTRAINT_SCHEMA

CONSTRAINT_NAME

TABLE_CATALOG

TABLE_SCHEMA

TABLE_NAME

PERIOD_NAME

This page is licensed: CC BY-SA / Gnu FDL

CONSTRAINT_CATALOG

This table is available as of MariaDB 11.4.

Information Schema
Application-Time Periods

Example

spinner

CONSTRAINT_SCHEMA

Database name, together with CONSTRAINT_NAME identifies the foreign key.

CONSTRAINT_NAME

Foreign key name, together with CONSTRAINT_SCHEMA identifies the foreign key.

UNIQUE_CONSTRAINT_CATALOG

Always def.

UNIQUE_CONSTRAINT_SCHEMA

Database name, together with UNIQUE_CONSTRAINT_NAME and REFERENCED_TABLE_NAME identifies the referenced key.

UNIQUE_CONSTRAINT_NAME

Referenced key name, together with UNIQUE_CONSTRAINT_SCHEMA and REFERENCED_TABLE_NAME identifies the referenced key.

MATCH_OPTION

Always NONE.

UPDATE_RULE

The Update Rule; one of CASCADE, SET NULL, SET DEFAULT, RESTRICT, NO ACTION.

DELETE_RULE

The Delete Rule; one of CASCADE, SET NULL, SET DEFAULT, RESTRICT, NO ACTION.

TABLE_NAME

Table name from the TABLE_CONSTRAINTS table.

REFERENCED_TABLE_NAME

Referenced key table name, together with UNIQUE_CONSTRAINT_SCHEMA and UNIQUE_CONSTRAINT_NAME identifies the referenced key.

This page is licensed: CC BY-SA / Gnu FDL

CONSTRAINT_CATALOG

Information Schema
foreign keys
KEY_COLUMN_USAGE

Always def.

spinner

FUNC_NAME

FILE_NAME

LINE_NO

TOTAL_ALLOC_MEM

CURRENT_ALLOC_MEM

ALLOC_MEM_COUNT

FREE_MEM_COUNT

This page is licensed: CC BY-SA / Gnu FDL

ID

Information Schema
Spider

spinner

CONSTRAINT_SCHEMA

Database name containing the constraint.

CONSTRAINT_NAME

Constraint name.

TABLE_SCHEMA

Database name.

TABLE_NAME

Table name.

CONSTRAINT_TYPE

Type of constraint; one of UNIQUE, PRIMARY KEY, FOREIGN KEY or CHECK.

The REFERENTIAL_CONSTRAINTS table has more information about foreign keys.

This page is licensed: CC BY-SA / Gnu FDL

CONSTRAINT_CATALOG

Always def.

Information Schema
constraints
spinner
Description

SPACE_ID

Modified page space id

PAGE_ID

Modified page id

START_LSN

Interval start after which page was changed (equal to checkpoint LSN)

END_LSN

Interval end before which page was changed (equal to checkpoint LSN)

This page is licensed: CC BY-SA / Gnu FDL

Information Schema
innodb_max_changed_pages
privilege
spinner

DOC_ID

Document ID of the row being deleted. Either an underlying ID value, or a sequence value generated by InnoDB if no usable option exists.

This page is licensed: CC BY-SA / Gnu FDL

Information Schema
INNODB_FT_DELETED
fulltext index
OPTIMIZE TABLE
privilege
innodb_ft_aux_table
spinner
Column Name
Description

KEY_ID

The Key ID used by the plugin.

KEY_VERSION

The latest version of the key currently in the cache.

Accessing the INFORMATION_SCHEMA.HASHICORP_KEY_MANAGEMENT_CACHE table requires the PROCESS privilege.

This table is available from MariaDB 12.3.

Columns

HashiCorp Key Management plugin

Required Privileges

SELECT * FROM information_schema.WSREP_STATUS\G
*************************** 1. row ***************************
         NODE_INDEX: 0
        NODE_STATUS: Synced
     CLUSTER_STATUS: Primary
       CLUSTER_SIZE: 3
 CLUSTER_STATE_UUID: 00b0fbad-6e84-11e4-8a8b-376f19ce8ee7
CLUSTER_STATE_SEQNO: 2
    CLUSTER_CONF_ID: 3
                GAP: NO
   PROTOCOL_VERSION: 3

Example

Galera
Information Schema
SHOW WSREP_STATUS
SUPER
WSREP_INFO plugin
spinner

Information Schema WSREP_MEMBERSHIP Table

The Information Schema WSREP_MEMBERSHIP table lists the current members of the Galera Cluster, including their node UUIDs, names, and IP addresses.

The WSREP_STATUS table makes Galera node cluster membership information available through the Information Schema. The same information can be returned using the SHOW WSREP_MEMBERSHIP statement. Only users with the SUPER can access information from this table.

The WSREP_MEMBERSHIP table is part of the WSREP_INFO plugin.

Example

SELECT * FROM information_schema.WSREP_MEMBERSHIP;
+-------+--------------------------------------+-------+-----------------+
| INDEX | UUID                                 | NAME  | ADDRESS         |
+-------+--------------------------------------+-------+-----------------+
|     0 | 46da96e3-6e9e-11e4-95a2-f609aa5444b3 | node1 | 10.0.2.15:16000 |
|     1 | 5f6bc72a-6e9e-11e4-84ed-57ec6780a3d3 | node2 | 10.0.2.15:16001 |
|     2 | 7473fd75-6e9e-11e4-91de-0b541ad91bd0 | node3 | 10.0.2.15:16002 |
+-------+--------------------------------------+-------+-----------------+

This page is licensed: CC BY-SA / Gnu FDL

spinner

DEFAULT_COLLATE_NAME

Default collation used.

DESCRIPTION

Character set description.

MAXLEN

Maximum length.

The SHOW CHARACTER SET statement returns the same results (although in a different order), and both can be refined in the same way. For example, the following two statements return the same results:

and

See Setting Character Sets and Collations for details on specifying the character set at the server, database, table and column levels, and Supported Character Sets and Collations for a full list of supported characters sets and collations.

This page is licensed: CC BY-SA / Gnu FDL

CHARACTER_SET_NAME

Information Schema
character sets

Name of the character set.

Example

spinner
This table lists all roles that are currently enabled, one role per row — the current role, roles granted to the current role, roles granted to these roles and so on. If no role is set, the row contains a NULL value.

The roles that the current user can enable are listed in the APPLICABLE_ROLES Information Schema table.

See also CURRENT_ROLE().

This page is licensed: CC BY-SA / Gnu FDL

ROLE_NAME

The enabled role name, or NULL.

Information Schema
roles

Examples

spinner

VARIABLE_NAME

Status variable name.

VARIABLE_VALUE

Global or session value.

This page is licensed: CC BY-SA / Gnu FDL

Information Schema
status variables
SHOW STATUS

Example

spinner

VARIABLE_NAME

System variable name.

VARIABLE_VALUE

Global or session value.

This page is licensed: CC BY-SA / Gnu FDL

Information Schema
system variables
SHOW VARIABLES

Example

spinner

TABLE_SCHEMA

Database name.

TABLE_NAME

Table name.

PERIOD

Period name.

START_COLUMN_NAME

Name of the column that starts the period.

END_COLUMN_NAME

Name of the column that ends the period.

This page is licensed: CC BY-SA / Gnu FDL

TABLE_CATALOG

Always contains the string 'def'.

This table is available as of MariaDB 11.4.

Information Schema
Application-Time Periods

Example

spinner

COUNT

Count of queries falling into the time interval

TOTAL

Total execution time of all queries for this interval

See QUERY_RESPONSE_TIME plugin for a full description.

The table is not a standard Information Schema table, and is a MariaDB extension.

SHOW QUERY_RESPONSE_TIME is available as an alternative for retrieving the data.

This page is licensed: CC BY-SA / Gnu FDL

TIME

Description

Information Schema
QUERY_RESPONSE_TIME

Time interval

Example

spinner
CLIENT_MODE - Client mode (local, high priority, toi...)
  • CLIENT_STATE - Wsrep query state (idle, exec, result...)

  • TRANSACTION_STATE - Wsrep transaction state or "none" if no active transaction

  • SEQNO - Commit order seqno if assigned, otherwise -1

  • DEPENDS_ON - Depends on seqno if assigned, otherwise -1 The table must have low overhead (populated only when queried) and must be enabled at all times (not plugin or plugin must be loaded by default).

  • GTID - transaction GTID assigned during commit phase

  • Example output:

    There is also an INFORMATION_SCHEMA.WSREP_THD_STATE_HISTORY table that contains the history of execution state information for Galera threads.

    This table is used in MariaDB Galera Cluster.

    This table is available as of MariaDB Enterprise Server 11.8.

    Column
    Description

    DOC_ID

    Document ID of the deleted row deleted. Either an underlying ID value, or a sequence value generated by InnoDB if no usable option exists.

    This page is licensed: CC BY-SA / Gnu FDL

    Information Schema
    fulltext index
    OPTIMIZE TABLE
    INNODB_FT_BEING_DELETED
    privilege
    innodb_ft_aux_table

    Example

    spinner
    FLUSH HASHICORP_KEY_MANAGEMENT_CACHE
    SHOW CHARACTER SET WHERE Maxlen LIKE '2';
    SELECT * FROM information_schema.CHARACTER_SETS 
    WHERE MAXLEN LIKE '2';
    SELECT CHARACTER_SET_NAME FROM information_schema.CHARACTER_SETS 
    WHERE DEFAULT_COLLATE_NAME LIKE '%chinese%';
    +--------------------+
    | CHARACTER_SET_NAME |
    +--------------------+
    | big5               |
    | gb2312             |
    | gbk                |
    +--------------------+
    SELECT * FROM information_schema.ENABLED_ROLES;
    +-----------+
    | ROLE_NAME |
    +-----------+
    | NULL      |
    +-----------+
    
    SET ROLE staff;
    
    SELECT * FROM information_schema.ENABLED_ROLES;
    +-----------+
    | ROLE_NAME |
    +-----------+
    | staff     |
    +-----------+
    SELECT * FROM information_schema.GLOBAL_STATUS;
    +-----------------------------------------------+--------------------+
    | VARIABLE_NAME                                 | VARIABLE_VALUE     |
    +-----------------------------------------------+--------------------+
    ...
    | BINLOG_SNAPSHOT_FILE                          | mariadb-bin.000208 |
    | BINLOG_SNAPSHOT_POSITION                      | 369                |
    ...
    | THREADS_CONNECTED                             | 1                  |
    | THREADS_CREATED                               | 1                  |
    | THREADS_RUNNING                               | 1                  |
    | UPTIME                                        | 57358              |
    | UPTIME_SINCE_FLUSH_STATUS                     | 57358              |
    +-----------------------------------------------+--------------------+
    SELECT * FROM information_schema.GLOBAL_VARIABLES ORDER BY VARIABLE_NAME\G
    *************************** 1. row *****************************
     VARIABLE_NAME: ARIA_BLOCK_SIZE
    VARIABLE_VALUE: 8192
    *************************** 2. row *****************************
     VARIABLE_NAME: ARIA_CHECKPOINT_LOG_ACTIVITY
    VARIABLE_VALUE: 1048576
    *************************** 3. row *****************************
     VARIABLE_NAME: ARIA_CHECKPOINT_INTERVAL
    VARIABLE_VALUE: 30
    ...
    *************************** 455. row ***************************
     VARIABLE_NAME: VERSION_COMPILE_MACHINE
    VARIABLE_VALUE: x86_64
    *************************** 456. row ***************************
     VARIABLE_NAME: VERSION_COMPILE_OS
    VARIABLE_VALUE: debian-linux-gnu
    *************************** 457. row ***************************
     VARIABLE_NAME: WAIT_TIMEOUT
    VARIABLE_VALUE: 600
    CREATE OR REPLACE TABLE t1(
     name VARCHAR(50), 
     date_1 DATE, 
     date_2 DATE, 
     PERIOD FOR date_period(date_1, date_2)
    );
    
    SELECT * FROM INFORMATION_SCHEMA.PERIODS;
    +---------------+--------------+------------+-------------+-------------------+-----------------+
    | TABLE_CATALOG | TABLE_SCHEMA | TABLE_NAME | PERIOD      | START_COLUMN_NAME | END_COLUMN_NAME |
    +---------------+--------------+------------+-------------+-------------------+-----------------+
    | def           | test         | t1         | date_period | date_1            | date_2          |
    +---------------+--------------+------------+-------------+-------------------+-----------------+
    SELECT * FROM information_schema.QUERY_RESPONSE_TIME;
    +----------------+-------+----------------+
    | TIME           | COUNT | TOTAL          |
    +----------------+-------+----------------+
    |       0.000001 |     0 |       0.000000 |
    |       0.000010 |    17 |       0.000094 |
    |       0.000100 |  4301         0.236555 |
    |       0.001000 |  1499 |       0.824450 |
    |       0.010000 | 14851 |      81.680502 |
    |       0.100000 |  8066 |     443.635693 |
    |       1.000000 |     0 |       0.000000 |
    |      10.000000 |     0 |       0.000000 |
    |     100.000000 |     1 |      55.937094 |
    |    1000.000000 |     0 |       0.000000 |
    |   10000.000000 |     0 |       0.000000 |
    |  100000.000000 |     0 |       0.000000 |
    | 1000000.000000 |     0 |       0.000000 |
    | TOO LONG       |     0 | TOO LONG       |
    +----------------+-------+----------------+
    SELECT * FROM information_schema.wsrep_thd_info;
    ID	OS_THREAD_ID	MODE	STATE	TRANSACTION_ID	TRANSACTION_STATE	SEQNO	DEPENDS_ON	GTID
    14	128875466565312	local	exec	64	executing	NULL	NULL	NULL
    13	128875466872512	local	exec	61	committing	9	3	0-1-7
    12	128875467179712	local	idle	NULL	aborted	NULL	NULL	NULL
    2	128875634570944	high priority	exec	NULL	executing	NULL	NULL	NULL
    1	128875634878144	local	none	NULL	executing	NULL	NULL	NULL
    SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_DELETED;
    +--------+
    | DOC_ID |
    +--------+
    |      2 |
    +--------+
    
    DELETE FROM test.ft_innodb LIMIT 1;
    
    SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_DELETED;
    +--------+
    | DOC_ID |
    +--------+
    |      2 |
    |      3 |
    +--------+

    TRACE

    A JSON document displaying the stats we collected when the query was run.

    MISSING_BYTES_BEYOND_MAX_MEM_SIZE

    For huge trace, where the trace is truncated due to the optimizer_trace_max_mem_size limit being reached, displays the bytes that are missing in the trace

    INSUFFICIENT_PRIVILEGES

    Set to 1 if the user running the trace does not have the privileges to see the trace.

    Structure:

    This page is licensed: CC BY-SA / Gnu FDL

    QUERY

    Displays the query that was asked to be traced.

    Description

    Information Schema
    SHOW CREATE TABLE INFORMATION_SCHEMA.OPTIMIZER_TRACE \G
    *************************** 1. row ***************************
           Table: OPTIMIZER_TRACE
    Create Table: CREATE TEMPORARY TABLE `OPTIMIZER_TRACE` (
      `QUERY` longtext NOT NULL DEFAULT '',
      `TRACE` longtext NOT NULL DEFAULT '',
      `MISSING_BYTES_BEYOND_MAX_MEM_SIZE` int(20) NOT NULL DEFAULT 0,
      `INSUFFICIENT_PRIVILEGES` tinyint(1) NOT NULL DEFAULT 0
    ) ENGINE=Aria DEFAULT CHARSET=utf8 PAGE_CHECKSUM=0
    spinner

    TABLE_CATALOG

    Always def.

    TABLE_SCHEMA

    Database name.

    TABLE_NAME

    Table name.

    PRIVILEGE_TYPE

    One of SELECT, INSERT, UPDATE, REFERENCES, ALTER, INDEX, DROP or CREATE VIEW.

    IS_GRANTABLE

    Whether the user has the for this privilege.

    Similar information can be accessed with the SHOW GRANTS statement. See the GRANT article for more about privileges.

    The table only shows privileges granted on the table level. This differs from the Sys Schema privileges_by_table_by_level view, which shows all privileges, broken down by table.

    For a description of the privileges that are shown in this table, see table privileges.

    • sys.privileges_by_table_by_level

    This page is licensed: CC BY-SA / Gnu FDL

    GRANTEE

    In the format user_name@host_name.

    Information Schema
    mysql.tables_priv

    See Also

    spinner

    THREADS

    total number of threads in this group (ACTIVE+STANDBY+LISTENER)

    ACTIVE_THREADS

    number of threads currently executing a query

    STANDBY_THREADS

    number of threads in reserve that do not currently execute anything

    QUEUE_LENGTH

    number of client requests waiting for execution

    HAS_LISTENER

    whether there is an active listener thread right now, always 1 if is ON

    IS_STALLED

    whether there's currently an active worker thread in this group that has exceeded

    Setting thread_pool_dedicated_listener will give each group its own dedicated listener, and the listener thread will not pick up work items. As a result, the actual queue size in the table will be more exact, since IO requests are immediately dequeued from poll, without delay.

    This page is licensed: CC BY-SA / Gnu FDL

    GROUP_ID

    the thread group this row is showing data for

    CONNECTIONS

    This table is available as of MariaDB 10.5.

    thread pool

    the number of clients currently connected to this thread group

    spinner

    PRIORITY

    request priority, see

    CONNECTION_ID

    ID of the client connection that submitted the queued request

    QUEUEING_TIME_MICROSECONDS

    how long the request has already been waiting in the queue in microseconds

    Setting thread_poll_exact_stats will provides better queueing time statistics by using a high precision timestamp, at a small performance cost, for the time when the connection was added to the queue. This timestamp helps calculate the queuing time shown in the table.

    Setting thread_pool_dedicated_listener will give each group its own dedicated listener, and the listener thread will not pick up work items. As a result, the queueing time in the table will be more exact, since IO requests are immediately dequeued from poll, without delay.

    This page is licensed: CC BY-SA / Gnu FDL

    GROUP_ID

    the thread group this row is showing data for

    POSITION

    This table is available from MariaDB 10.5.

    thread pool

    position in the groups queue

    spinner

    THREAD_CREATIONS_DUE_TO_STALL

    number of threads created due to detected stalls

    WAKES

    standby thread wakeups

    WAKES_DUE_TO_STALL

    wakeups due to stalls

    THROTTLES

    how often thread creation was throttled, see also:

    STALLS

    number of detected stalls

    POLLS_BY_LISTENER

    POLLS_BY_WORKER

    DEQUEUES_BY_LISTENER

    DEQUEUES_BY_WORKER

    This page is licensed: CC BY-SA / Gnu FDL

    GROUP_ID

    the thread group this row is showing data for

    THREAD_CREATIONS

    This table is available from MariaDB 10.5.

    thread pool

    number of threads created for this group so far

    spinner

    TABLE_CATALOG

    Always def.

    PRIVILEGE_TYPE

    The specific privilege, for example CREATE USER, RELOAD, SHUTDOWN, SELECT, INSERT, UPDATE or REFERENCES.

    IS_GRANTABLE

    Whether the user has the for this privilege.

    The database, table and column privileges returned here are the ones granted on all databases and tables, and by implication all columns.

    Similar information can be accessed with the SHOW GRANTS statement. See the GRANT article for more about privileges.

    This information is also stored in the mysql.global_priv table, in the mysql system database.

    This page is licensed: CC BY-SA / Gnu FDL

    GRANTEE

    Information Schema
    mysql.global_priv

    In the format user_name@host_name.

    spinner

    PASSWORD_ERRORS

    A current accumulated value of consecutive password login failures. If password_errors is not applicable for the user (see ), PASSWORD_ERRORS will be NULL. Only password login attempts with nonempty password are taken into account.

    PASSWORD_EXPIRATION_TIME

    A timestamp with the exact point in time calculated from password_last_changed and password_lifetime (i.e. days) stored for the user.

    This page is licensed: CC BY-SA / Gnu FDL

    USER

    This table is available from .

    Information Schema
    password expiry
    max_password_errors
    mysql.global_priv

    In the format user_name@host_name.

    spinner

    Numeric tablespace. Matches the value.

    PATH

    Tablespace datafile path.

    This page is licensed: CC BY-SA / Gnu FDL

    This table is deprecated and was removed in MariaDB 10.6.0.

    Information Schema
    privilege

    SPACE

    SELECT * FROM INNODB_SYS_DATAFILES;
    +-------+--------------------------------+
    | SPACE | PATH                           |
    +-------+--------------------------------+
    |    19 | ./test/t2.ibd                  |
    |    20 | ./test/t3.ibd                  |
    ...
    |    68 | ./test/animals.ibd             |
    |    69 | ./test/animal_count.ibd        |
    |    70 | ./test/t.ibd                   |
    +-------+--------------------------------+

    Example

    spinner

    Information Schema CATALOG Table

    The Information Schema CATALOG table stores information about catalogs on the server, including default character sets and collations.

    This table is available as of MariaDB 12.0.

    The Information Schema CATALOG table stores information about catalogs on the server.

    It contains the following columns:

    Column
    Description

    CATALOG_NAME

    Catalog name.

    This page is licensed: CC BY-SA / Gnu FDL

    Information Schema COLLATION_CHARACTER_SET_APPLICABILITY Table

    The Information Schema COLLATION_CHARACTER_SET_APPLICABILITY table maps which character sets are associated with which collations.

    The Information Schema COLLATION_CHARACTER_SET_APPLICABILITY table shows which character sets are associated with which collations.

    It contains the following columns:

    Column
    Description

    COLLATION_NAME

    The table is table of the base COLLATION_NAMES in the same way that table is table of the base CHARACTER_SET_NAMES. The COLLATION_CHARACTER_SET_APPLICABILITY table is the mapping between collations and character sets.

    When joining the table with its field TABLE_COLLATIONS, this should be joined to FULL_COLLATION_NAME in the COLLATION_CHARACTER_SET_APPLICABILITY table.

    See for details on specifying the character set at the server, database, table and column levels.

    This page is licensed: CC BY-SA / Gnu FDL

    Information Schema DISKS Table

    The Information Schema DISKS table, created by the DISKS plugin, displays metadata such as total and available space for disks on the system.

    The plugin only works on Linux.

    Description

    The DISKS table is created when the DISKS plugin is enabled, and shows metadata about disks on the system.

    This plugin requires the FILE privilege.

    This plugin does not check . When it is enabled, any user can query the INFORMATION_SCHEMA.DISKS table and see all the information it provides.

    The table contains the following columns:

    Column
    Description

    Note that as the amount of space available to root (OS user) may be more that what is available to non-root users, 'available' + 'used' may be less than 'total'.

    All paths to which a particular disk has been mounted are reported. The rationale is that someone might want to take different action e.g. depending on which disk is relevant for a particular path. This leads to the same disk being reported multiple times.

    • for details on installing, options

    • for details on managing plugins.

    This page is licensed: CC BY-SA / Gnu FDL

    Information Schema FEEDBACK Table

    The Information Schema FEEDBACK table is created when the Feedback Plugin is enabled and contains the usage data collected for submission.

    The Information Schema FEEDBACK table is created when the Feedback Plugin is enabled, and contains the complete contents submitted by the plugin.

    It contains two columns:

    Column
    Description

    VARIABLE_NAME

    It is possible to disable automatic collection, by setting the variable to an empty string, and to submit the contents manually, as follows:

    Then you can send it by opening in your browser, and uploading your generated report.txt. Or you can do it from the command line with (for example):

    Manual uploading allows you to be absolutely sure that we receive only the data shown in the information_schema.FEEDBACK table and that no private or sensitive information is being sent.

    This page is licensed: CC BY-SA / Gnu FDL

    Information Schema INDEX_STATISTICS Table

    The Information Schema INDEX_STATISTICS table provides statistics on index usage, helping to identify unused indexes and optimize performance.

    The Information Schema INDEX_STATISTICS table shows statistics on index usage and makes it possible to do such things as locating unused indexes and generating the commands to remove them.

    This is part of the User Statistics feature, which is not enabled by default.

    It contains the following columns:

    Field
    Type
    Notes

    This page is licensed: CC BY-SA / Gnu FDL

    Information Schema KEY_CACHES Table

    The Information Schema KEY_CACHES table displays statistics about the segmented key cache, including block usage and read/write requests.

    The Information Schema KEY_CACHES table shows statistics about the segmented key cache.

    It contains the following columns:

    Column Name
    Description

    KEY_CACHE_NAME

    The name of the key cache

    This page is licensed: CC BY-SA / Gnu FDL

    Information Schema KEY_COLUMN_USAGE Table

    The Information Schema KEY_COLUMN_USAGE table details which columns in a table are constrained by keys, such as primary or foreign keys.

    The Information Schema KEY_COLUMN_USAGE table shows which key columns have constraints.

    It contains the following columns:

    Column
    Description

    CONSTRAINT_CATALOG

    Always def.

    This page is licensed: CC BY-SA / Gnu FDL

    Information Schema LOCALES Table

    The Information Schema LOCALES table lists all compiled-in locales available to the server, providing their IDs, names, and descriptions.

    Description

    The Information Schema LOCALES table contains a list of all compiled-in locales. It is only available if the LOCALES plugin has been installed.

    It contains the following columns:

    Column
    Description

    ID

    The table is not a standard Information Schema table, and is a MariaDB extension.

    The statement returns a subset of the information.

    This page is licensed: CC BY-SA / Gnu FDL

    Information Schema TRIGGERED_UPDATE_COLUMNS

    The Information Schema TRIGGERED_UPDATE_COLUMNS table identifies which columns are modified by the SET clause of a specific trigger.

    This table is available from .

    The Information Schema TRIGGERED_UPDATE_COLUMNS table shows columns specified in triggers for update operations.

    Columns are displayed only if the user has non-SELECT privileges on the columns.

    It contains the following columns:

    Column
    Description

    This page is licensed: CC BY-SA / Gnu FDL

    Information Schema USER_VARIABLES Table

    The Information Schema USERS_VARIABLES table lists user accounts, including whether they are global or local, and details about their password expiration.

    Description

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

    The table contains the following columns:

    Column
    Description

    VARIABLE_NAME

    User variables are reset and the table emptied with the statement. SHOW USER_VARIABLES displays a subset of the data.

    This page is licensed: CC BY-SA / Gnu FDL

    Information Schema WSREP_CERT_KEYS

    The Information Schema WSREP_CERT_KEYS table displays the certification keys for transactions currently being processed by the Galera Cluster.

    This table is used in .

    This table is available as of MariaDB Enterprise Server 11.8.

    The Wsrep certification keys, the primary keys of changed rows, are collected into a write set for Galera Cluster's certification-based replication. The write set is used to ensure data consistency by detecting conflicting transactions before they commit. The WSREP_CERT_INFO plugin exposes wsrep certification keys in two information schema tables: WSREP_CERT_KEYS (this table), and WSREP_CERT_KEYS_HISTORY.

    There are several key types.

    Exclusive

    The Exclusive key type is used when a transaction inserts, updates, or deletes a row. Example:

    CREATE TABLE parent (f1 TINYINT PRIMARY KEY, f2 TINYINT)engine=innodb;
    START TRANSACTION; 
    INSERT INTO parent VALUES (1, 3); 
    SELECT * FROM INFORMATION_SCHEMA.WSREP_CERT_KEYS; 
    COMMIT; 
    +--------+-----------------------------+-----------+
    | THD_ID | KEY_STRING                  | KEY_TYPE  |
    +--------+-----------------------------+-----------+
    |      9 | 74657374 706172656E74 0001  | exclusive |
    +--------+-----------------------------+-----------+
    1 row in set (0.001 sec)

    Reference

    The Reference key type is used when a FOREIGN KEY constraint is defined with referenced table key tpe set as REFERENCE. In the example, 706172656E74 is a hexadecimal value for 'parent'. Example:

    The Update key type is used when a transaction updates a row and wsrep_protocol_version is greater than 4. Otherwise, the Exclusive key type is used. Example:

    This key type is used when a referenced table update happens, and wsrep_protocol_version is smaller than 4.

    Information Schema INNODB_CMP_PER_INDEX and INNODB_CMP_PER_INDEX_RESET Tables

    These tables provide status information on compression operations for XtraDB/InnoDB tables, grouped by individual indexes.

    The INNODB_CMP_PER_INDEX and INNODB_CMP_PER_INDEX_RESET tables contain status information on compression operations related to compressed XtraDB/InnoDB tables, grouped by individual indexes. These tables are only populated if the innodb_cmp_per_index_enabled system variable is set to ON.

    The PROCESS privilege is required to query this table.

    These tables contains the following columns:

    Column Name
    Description

    These tables can be used to measure the effectiveness of XtraDB/InnoDB compression, per table or per index. The values in these tables show which tables perform better with index compression, and which tables cause too many compression failures or perform too many compression/uncompression operations. When compression performs badly for a table, this might mean that you should change its KEY_BLOCK_SIZE, or that the table should not be compressed.

    INNODB_CMP_PER_INDEX and INNODB_CMP_PER_INDEX_RESET have the same columns and always contain the same values, but when INNODB_CMP_PER_INDEX_RESET is queried, both the tables are cleared. INNODB_CMP_PER_INDEX_RESET can be used, for example, if a script periodically logs the performances of compression in the last period of time. INNODB_CMP_PER_INDEX can be used to see the cumulated statistics.

    Other tables that can be used to monitor XtraDB/InnoDB compressed tables:

    This page is licensed: CC BY-SA / Gnu FDL

    Information Schema INNODB_BUFFER_POOL_PAGES_INDEX Table

    The INNODB_BUFFER_POOL_PAGES_INDEX table provides information about index pages in the buffer pool, specific to the XtraDB engine.

    The Information Schema INNODB_BUFFER_POOL_PAGES table is a Percona enhancement, and is only available for XtraDB, not InnoDB (see XtraDB and InnoDB). It contains information about buffer pool index pages.

    It has the following columns:

    Column
    Description

    INDEX_ID

    This page is licensed: CC BY-SA / Gnu FDL

    Information Schema INNODB_CMPMEM and INNODB_CMPMEM_RESET Tables

    These tables provide status statistics on compressed pages within the buffer pool, useful for analyzing compression efficiency.

    The INNODB_CMPMEM and INNODB_CMPMEM_RESET tables contain status information on compressed pages in the buffer pool (see InnoDB COMPRESSED format).

    The PROCESS privilege is required to query this table.

    These tables contain the following columns:

    Column Name
    Description

    These tables can be used to measure the effectiveness of InnoDB table compression. When you have to decide a value for KEY_BLOCK_SIZE, you can create more than one version of the table (one for each candidate value) and run a realistic workload on them. Then, these tables can be used to see how the operations performed with different page sizes.

    INNODB_CMPMEM and INNODB_CMPMEM_RESET have the same columns and always contain the same values, but when INNODB_CMPMEM_RESET is queried, the RELOCATION_TIME column from both the tables are cleared. INNODB_CMPMEM_RESET can be used, for example, if a script periodically logs the performances of compression in the last period of time. INNODB_CMPMEM can be used to see the cumulated statistics.

    Other tables that can be used to monitor InnoDB compressed tables:

    This page is licensed: CC BY-SA / Gnu FDL

    Information Schema INNODB_FT_CONFIG Table

    The Information Schema INNODB_FT_CONFIG table displays metadata about the configuration of an InnoDB FULLTEXT index, such as the internal cache size.

    The Information Schema INNODB_FT_CONFIG table contains InnoDB fulltext index metadata.

    The SUPER privilege is required to view the table, and it also requires the innodb_ft_aux_table system variable to be set.

    It has the following columns:

    Column
    Description

    This page is licensed: CC BY-SA / Gnu FDL

    Information Schema INNODB_FT_DEFAULT_STOPWORD Table

    The INNODB_FT_DEFAULT_STOPWORD table lists the default stop words used by InnoDB FULLTEXT indexes when no custom stopword list is defined.

    The Information Schema INNODB_FT_DEFAULT_STOPWORD table contains a list of default stopwords used when creating an InnoDB fulltext index.

    The PROCESS privilege is required to view the table.

    It has the following column:

    Column
    Description

    This page is licensed: CC BY-SA / Gnu FDL

    Information Schema INNODB_BUFFER_POOL_PAGES_BLOB Table

    The INNODB_BUFFER_POOL_PAGES_BLOB table contains information about blob pages in the buffer pool, only available for XtraDB.

    The Information Schema INNODB_BUFFER_POOL_PAGES_BLOB table is a Percona enhancement, and is only available for XtraDB, not InnoDB (see XtraDB and InnoDB). It contains information about buffer pool blob pages.

    It has the following columns:

    Column
    Description

    SPACE_ID

    This page is licensed: CC BY-SA / Gnu FDL

    Information Schema INNODB_LOCK_WAITS Table

    The Information Schema INNODB_LOCK_WAITS table maps blocked transactions to the transactions that are blocking them, aiding in deadlock analysis.

    The Information Schema INNODB_LOCK_WAITS table contains information about blocked InnoDB transactions. The PROCESS privilege is required to view the table.

    It contains the following columns:

    Column
    Description

    The table is often used in conjunction with the and tables to diagnose problematic locks and transactions.

    This page is licensed: CC BY-SA / Gnu FDL

    Information Schema INNODB_SYS_FIELDS Table

    The INNODB_SYS_FIELDS table lists the fields that comprise InnoDB indexes, detailing their position within the index structure.

    The Information Schema INNODB_SYS_FIELDS table contains information about fields that are part of an InnoDB index.

    The PROCESS privilege is required to view the table.

    It has the following columns:

    Column
    Description

    This page is licensed: CC BY-SA / Gnu FDL

    Information Schema INNODB_MUTEXES Table

    The Information Schema INNODB_MUTEXES table displays statistics about InnoDB mutex and read-write lock waits, helping to identify internal contention.

    The INNODB_MUTEXES table monitors mutex and rw locks waits. It has the following columns:

    Column
    Description

    NAME

    Name of the lock, as it appears in the source code.

    CREATE_FILE

    The CREATE_FILE and CREATE_LINE columns depend on the InnoDB/XtraDB version.

    The table provides information about all columns listed in the previous table.

    The table provides information about rw_lock_t, not about any mutexes.

    The statement provides similar information.

    This page is licensed: CC BY-SA / Gnu FDL

    Information Schema PROFILING Table

    The Information Schema PROFILING table provides statement resource usage details, such as CPU time and block operations, when profiling is enabled.

    The PROFILING table contains information about statement resource usage. Profiling information is only recorded if the session variable is set to 1.

    It contains the following columns:

    Column Name
    Description

    Information Schema SCHEMATA Table

    The Information Schema SCHEMATA table stores information about databases on the server, including default character sets and collations.

    The SCHEMATA table stores information about databases on the server.

    It contains the following columns:

    Column
    Description

    Information Schema TABLE_STATISTICS Table

    The Information Schema TABLE_STATISTICS table provides usage statistics for tables, such as the number of rows read or changed.

    The TABLE_STATISTICS table shows statistics on table usage.

    This is part of the feature, which is not enabled by default.

    It contains the following columns:

    Field
    Type
    Notes

    Information Schema WSREP_BF_ABORTS

    The Information Schema WSREP_BF_ABORTS table provides statistics on Galera Cluster brute force aborts, detailing the victim and transaction IDs.

    This table contains execution state information for Galera threads. is not installed by default — you have to install it.

    The table displays the history of

    Information Schema INNODB_FT_INDEX_TABLE Table

    The INNODB_FT_INDEX_TABLE table provides information about the inverted index (tokens and positions) for an InnoDB FULLTEXT index currently in use.

    The INNODB_FT_INDEX_TABLE table contains information about InnoDB . To avoid re-organizing the fulltext index each time a change is made, which would be very expensive, new changes are stored separately and only integrated when an is run. See the table.

    The SUPER is required to view the table, and it also requires the system variable to be set.

    It has the following columns:

    Column
    Description

    Information Schema COLUMN_PRIVILEGES Table

    The Information Schema COLUMN_PRIVILEGES table contains column privilege information derived from the mysql.columns_priv grant table.

    The COLUMN_PRIVILEGES table contains column privilege information derived from the grant table.

    It has the following columns:

    Column
    Description

    Information Schema INNODB_BUFFER_POOL_PAGES Table

    The Information Schema INNODB_BUFFER_POOL_PAGES table provides a record for each page in the buffer pool, specific to the XtraDB engine.

    The INNODB_BUFFER_POOL_PAGES table is a Percona enhancement, and is only available for XtraDB, not InnoDB (see ). It contains a record for each page in the .

    It has the following columns:

    Column
    Description

    Information Schema INNODB_SYS_FOREIGN_COLS Table

    The INNODB_SYS_FOREIGN_COLS table maps columns to their respective foreign key constraints within the InnoDB storage engine.

    The INNODB_SYS_FOREIGN_COLS table contains information about InnoDB columns.

    The PROCESS is required to view the table.

    It has the following columns:

    Column
    Description

    COMPRESS_TIME

    Time (in seconds) spent to compress pages of the size PAGE_SIZE. This value includes time spent in compression failures.

    UNCOMPRESS_OPS

    How many times a page of INDEX_NAME has been uncompressed. This happens when an uncompressed version of a page is created in the buffer pool, or when a compression failure occurs.

    UNCOMPRESS_TIME

    Time (in seconds) spent to uncompress pages of INDEX_NAME.

    DATABASE_NAME

    Database containing the index.

    TABLE_NAME

    Table containing the index.

    INDEX_NAME

    Other values are totals which refer to this index's compression.

    COMPRESS_OPS

    How many times a page of INDEX_NAME has been compressed. This happens when a new page is created because the compression log runs out of space. This value includes both successful operations and compression failures.

    COMPRESS_OPS_OK

    How many times a page of INDEX_NAME has been successfully compressed. This value should be as close as possible to COMPRESS_OPS. If it is notably lower, either avoid compressing some tables, or increase the KEY_BLOCK_SIZE for some compressed tables.

    See Also

    INNODB_CMP and INNODB_CMP_RESET
    INNODB_CMPMEM and INNODB_CMPMEM_RESET
    spinner

    Index name

    SPACE_ID

    Tablespace ID

    PAGE_NO

    Page offset within tablespace.

    N_RECS

    Number of user records on the page.

    DATA_SIZE

    Total data size in bytes of records in the page.

    HASHED

    1 if the block is in the adaptive hash index, 0 if not.

    ACCESS_TIME

    Page's last access time.

    MODIFIED

    1 if the page has been modified since being loaded, 0 if not.

    DIRTY

    1 if the page has been modified since it was last flushed, 0 if not

    OLD

    1 if the page in the in the old blocks of the LRU (least-recently-used) list, 0 if not.

    LRU_POSITION

    Position in the LRU (least-recently-used) list.

    FIX_COUNT

    Page reference count, incremented each time the page is accessed. 0 if the page is not currently being accessed.

    FLUSH_TYPE

    Flush type of the most recent flush.0 (LRU), 2 (flush_list)

    spinner

    Tablespace ID.

    PAGE_NO

    Page offset within tablespace.

    COMPRESSED

    1 if the blob contains compressed data, 0 if not.

    PART_LEN

    Page data length.

    NEXT_PAGE_NO

    Next page number.

    LRU_POSITION

    Page position in the LRU (least-recently-used) list.

    FIX_COUNT

    Page reference count, incremented each time the page is accessed. 0 if the page is not currently being accessed.

    FLUSH_TYPE

    Flush type of the most recent flush.0 (LRU), 2 (flush_list)

    spinner

    REQUESTING_TRX_ID

    Requesting transaction ID from the INNODB_TRX table.

    REQUESTED_LOCK_ID

    Lock ID from the INNODB.LOCKS table for the waiting transaction.

    BLOCKING_TRX_ID

    Blocking transaction ID from the INNODB_TRX table.

    BLOCKING_LOCK_ID

    Lock ID from the INNODB.LOCKS table of a lock held by a transaction that is blocking another transaction.

    INNODB_LOCKS
    INNODB_TRX
    spinner
    GRANT OPTION
    thread_pool_dedicated_listener
    thread_pool_stall_limit time
    priority scheduling
    thread-creation-throttling
    GRANT OPTION

    Query_ID.

    SEQ

    Sequence number showing the display order for rows with the same QUERY_ID.

    STATE

    Profiling state.

    DURATION

    Time in seconds that the statement has been in the current state.

    CPU_USER

    User CPU usage in seconds.

    CPU_SYSTEM

    System CPU usage in seconds.

    CONTEXT_VOLUNTARY

    Number of voluntary context switches.

    CONTEXT_INVOLUNTARY

    Number of involuntary context switches.

    BLOCK_OPS_IN

    Number of block input operations.

    BLOCK_OPS_OUT

    Number of block output operations.

    MESSAGES_SENT

    Number of communications sent.

    MESSAGES_RECEIVED

    Number of communications received.

    PAGE_FAULTS_MAJOR

    Number of major page faults.

    PAGE_FAULTS_MINOR

    Number of minor page faults.

    SWAPS

    Number of swaps.

    SOURCE_FUNCTION

    Function in the source code executed by the profiled state.

    SOURCE_FILE

    File in the source code executed by the profiled state.

    SOURCE_LINE

    Line in the source code executed by the profiled state.

    It contains similar information to the SHOW PROFILE and SHOW PROFILES statements.

    Profiling is enabled per session. When a session ends, its profiling information is lost.

    This page is licensed: CC BY-SA / Gnu FDL

    Information Schema
    profiling

    QUERY_ID

    spinner

    SPACE_ID

    Tablespace ID.

    PAGE_NO

    Page offset within tablespace.

    LRU_POSITION

    Page position in the LRU (least-recently-used) list.

    FIX_COUNT

    Page reference count, incremented each time the page is accessed. 0 if the page is not currently being accessed.

    FLUSH_TYPE

    Flush type of the most recent flush.0 (LRU), 2 (flush_list)

    This page is licensed: CC BY-SA / Gnu FDL

    PAGE_TYPE

    Information Schema
    XtraDB and InnoDB
    buffer pool

    Type of page; one of index, undo_log, inode, ibuf_free_list, allocated, bitmap, sys, trx_sys, fsp_hdr, xdes, blob, zblob, zblob2 and unknown.

    spinner

    Character Sets and Collations

    DEFAULT_CHARACTER_SET_NAME

    Default character set for the database.

    DEFAULT_COLLATION_NAME

    Default collation.

    SCHEMA_COMMENT

    Catalog comment

    Example

    See Also

    SHOW CATALOGS
    SHOW CREATE CATALOG
    CREATE CATALOG
    DROP CATALOG
    spinner

    Collation name.

    CHARACTER_SET_NAME

    Name of the associated character set.

    FULL_COLLATION_NAME

    Name of the associated character set/collation combination.

    ID

    The unique identifier of this character set/collation combination.

    IS_DEFAULT

    If the collation is the default for this character set.

    Example

    COLLATIONS
    CHARACTER_SETS
    information_schema.TABLES
    Setting Character Sets and Collations
    spinner

    DISK

    Name of the disk itself.

    PATH

    Mount point of the disk.

    TOTAL

    Total space in KiB.

    USED

    Used amount of space in KiB.

    AVAILABLE

    Amount of space in KiB available to non-root users.

    Example

    See Also

    Disks Plugin
    Plugin Overview
    spinner
    user privileges

    Name of the item of information being collected.

    VARIABLE_VALUE

    Contents of the item of information being collected.

    Example

    feedback_url
    post
    spinner

    SEGMENTS

    total number of segments (set to NULL for regular key caches)

    SEGMENT_NUMBER

    segment number (set to NULL for any regular key caches and for rows containing aggregation statistics for segmented key caches)

    FULL_SIZE

    memory for cache buffers/auxiliary structures

    BLOCK_SIZE

    size of the blocks

    USED_BLOCKS

    number of currently used blocks

    UNUSED_BLOCKS

    number of currently unused blocks

    DIRTY_BLOCKS

    number of currently dirty blocks

    READ_REQUESTS

    number of read requests

    READS

    number of actual reads from files into buffers

    WRITE_REQUESTS

    number of write requests

    WRITES

    number of actual writes from buffers into files

    Example

    spinner

    CONSTRAINT_SCHEMA

    Database name of the constraint.

    CONSTRAINT_NAME

    Name of the constraint (PRIMARY for the primary key).

    TABLE_CATALOG

    Always #def.

    TABLE_SCHEMA

    Database name of the column constraint.

    TABLE_NAME

    Table name of the column constraint.

    COLUMN_NAME

    Column name of the constraint.

    ORDINAL_POSITION

    Position of the column within the constraint.

    POSITION_IN_UNIQUE_CONSTRAINT

    For foreign keys, the position in the unique constraint.

    REFERENCED_TABLE_SCHEMA

    For foreign keys, the referenced database name.

    REFERENCED_TABLE_NAME

    For foreign keys, the referenced table name.

    REFERENCED_COLUMN_NAME

    For foreign keys, the referenced column name.

    Example

    See Also

    Finding Tables Without Primary Keys
    spinner

    Row ID.

    NAME

    Locale name, for example en_GB.

    DESCRIPTION

    Locale description, for example English - United Kingdom.

    MAX_MONTH_NAME_LENGTH

    Numeric length of the longest month in the locale

    MAX_DAY_NAME_LENGTH

    Numeric length of the longest day name in the locale.

    DECIMAL_POINT

    Decimal point character (some locales use a comma).

    THOUSAND_SEP

    Thousand's character separator,

    ERROR_MESSAGE_LANGUAGE

    Error message language.

    Example

    SHOW LOCALES
    spinner

    TRIGGER_CATALOG

    Always def in MariaDB.

    TRIGGER_SCHEMA

    Name of the database containing the trigger.

    TRIGGER_NAME

    Name of the trigger.

    EVENT_OBJECT_CATALOG

    Always def in MariaDB

    EVENT_OBJECT_SCHEMA

    Name of the database containing the table that the trigger is defined on.

    EVENT_OBJECT_TABLE

    Name of the table that the trigger is defined on.

    EVENT_OBJECT_COLUMN

    Name of the column that the trigger is defined on.

    Examples

    spinner
    MariaDB 12.2

    Variable name.

    VARIABLE_VALUE

    Variable value.

    VARIABLE_TYPE

    Variable type.

    CHARACTER_SET_NAME

    Character set.

    Example

    See Also

    FLUSH USER_VARIABLES
    User-defined variables
    Performance Schema user_variables_by_thread Table
    spinner

    Update

    Shared

    MariaDB Galera Cluster

    KEY

    Metadata item name.

    VALUE

    Associated value.

    Example

    spinner

    VALUE

    Default stopword for an InnoDB fulltext index. Setting either the innodb_ft_server_stopword_table or the innodb_ft_user_stopword_table system variable will override this.

    Example

    spinner

    INDEX_ID

    Index identifier, matching the value from INNODB_SYS_INDEXES.INDEX_ID.

    NAME

    Field name, matching the value from INNODB_SYS_COLUMNS.NAME.

    POS

    Ordinal position of the field within the index, starting from 0. This is adjusted as columns are removed.

    Example

    spinner

    File name of the mutex implementation.

    CREATE_LINE

    Line number of the mutex implementation.

    OS_WAITS

    How many times the mutex occurred.

    Examples

    SHOW ENGINE INNODB STATUS
    spinner
    BF
    aborts. It has these columns:
    • TIME - Datetime when bf abort happened

    • VICTIM_TRX_ID - Victim trx ID or NULL

    • VICTIM_THREAD_ID - Victim thread

    • THD ID VICTIM_QUERY_ID - Victim query id

    • VICTIM_SEQNO - Victim TO seqno associated with victim transaction

    • VICTIM_CLIENT_STATE - Victim thread wsrep client state at the moment when BF abort attempt happened

    • VICTIM_CLIENT_MODE - Victim thread wsrep client mode

    • VICTIM_TRX_STATE - Victim thread wsrep transaction state at the moment when BF abort attempt happened

    • VICTIM_LOCK - Victim lock information

    • BF_TRX_ID - BF thread transaction ID

    • BF_THREAD_ID - BF thread THD ID

    • BF_QUERY_ID - BF query id

    • BF_SEQNO - TO sequence number associated with BF transaction

    • BF_CLIENT_STATE - BF thread wsrep client state

    • BF_CLIENT_MODE - BF thread wsrep client mode

    • BF_TRX_STATE - BF thread wsrep transaction state

    • BF_LOCK - Information about the lock which BF thread tried to acquire

    • SPACE_ID - Lock space_id in case of record or table lock

    • PAGE_NO - Lock page_no in case of record lock

    • INDEX_NAME - Record lock index name

    • TABLE_NAME - Lock table name

    Example output:

    This plugin is used in MariaDB Galera Cluster.

    This plugin is available as of MariaDB Enterprise Server 11.8.

    The respective plugin
    MariaDB [def.test]> SELECT * FROM INFORMATION_SCHEMA.CATALOGS\G
    *************************** 1. row ***************************
                  CATALOG_NAME: c1
    DEFAULT_CHARACTER_SET_NAME: latin1
        DEFAULT_COLLATION_NAME: latin1_swedish_ci
               CATALOG_COMMENT: This is catalog c1
    *************************** 2. row ***************************
                  CATALOG_NAME: cat2
    DEFAULT_CHARACTER_SET_NAME: latin1
        DEFAULT_COLLATION_NAME: latin1_swedish_ci
               CATALOG_COMMENT: 
    *************************** 3. row ***************************
                  CATALOG_NAME: def
    DEFAULT_CHARACTER_SET_NAME: latin1
        DEFAULT_COLLATION_NAME: latin1_swedish_ci
               CATALOG_COMMENT: default catalog
    ...
    SELECT * FROM information_schema.COLLATION_CHARACTER_SET_APPLICABILITY  WHERE
      CHARACTER_SET_NAME='utf32' ORDER BY IS_DEFAULT DESC, ID LIMIT 10;
    +--------------------+--------------------+---------------------+-----+------------+
    | COLLATION_NAME     | CHARACTER_SET_NAME | FULL_COLLATION_NAME | ID  | IS_DEFAULT |
    +--------------------+--------------------+---------------------+-----+------------+
    | utf32_general_ci   | utf32              | utf32_general_ci    |  60 | Yes        |
    | utf32_bin          | utf32              | utf32_bin           |  61 |            |
    | utf32_unicode_ci   | utf32              | utf32_unicode_ci    | 160 |            |
    | utf32_icelandic_ci | utf32              | utf32_icelandic_ci  | 161 |            |
    | utf32_latvian_ci   | utf32              | utf32_latvian_ci    | 162 |            |
    | utf32_romanian_ci  | utf32              | utf32_romanian_ci   | 163 |            |
    | utf32_slovenian_ci | utf32              | utf32_slovenian_ci  | 164 |            |
    | utf32_polish_ci    | utf32              | utf32_polish_ci     | 165 |            |
    | utf32_estonian_ci  | utf32              | utf32_estonian_ci   | 166 |            |
    | utf32_spanish_ci   | utf32              | utf32_spanish_ci    | 167 |            |
    +--------------------+--------------------+---------------------+-----+------------+
    10 rows in set (0.004 sec)
    SELECT * FROM information_schema.DISKS;
    
    +-----------+-------+----------+---------+-----------+
    | Disk      | Path  | Total    | Used    | Available |
    +-----------+-------+----------+---------+-----------+
    | /dev/vda1 | /     | 26203116 | 2178424 |  24024692 |
    | /dev/vda1 | /boot | 26203116 | 2178424 |  24024692 |
    | /dev/vda1 | /etc  | 26203116 | 2178424 |  24024692 |
    +-----------+-------+----------+---------+-----------+
    $ mysql -e 'SELECT * FROM information_schema.FEEDBACK' > report.txt
    $ curl -F data=@report.txt https://mariadb.org/feedback_plugin/post
    SELECT * FROM information_schema.FEEDBACK\G
    ...
    *************************** 906. row ***************************
     VARIABLE_NAME: Uname_sysname
    VARIABLE_VALUE: Linux
    *************************** 907. row ***************************
     VARIABLE_NAME: Uname_release
    VARIABLE_VALUE: 3.13.0-53-generic
    *************************** 908. row ***************************
     VARIABLE_NAME: Uname_version
    VARIABLE_VALUE: #89-Ubuntu SMP Wed May 20 10:34:39 UTC 2015
    *************************** 909. row ***************************
     VARIABLE_NAME: Uname_machine
    VARIABLE_VALUE: x86_64
    *************************** 910. row ***************************
     VARIABLE_NAME: Uname_distribution
    VARIABLE_VALUE: lsb: Ubuntu 14.04.2 LTS
    *************************** 911. row ***************************
     VARIABLE_NAME: Collation used latin1_german1_ci
    VARIABLE_VALUE: 1
    *************************** 912. row ***************************
     VARIABLE_NAME: Collation used latin1_swedish_ci
    VARIABLE_VALUE: 18
    *************************** 913. row ***************************
     VARIABLE_NAME: Collation used utf8_general_ci
    VARIABLE_VALUE: 567
    *************************** 914. row ***************************
     VARIABLE_NAME: Collation used latin1_bin
    VARIABLE_VALUE: 1
    *************************** 915. row ***************************
     VARIABLE_NAME: Collation used binary
    VARIABLE_VALUE: 16
    *************************** 916. row ***************************
     VARIABLE_NAME: Collation used utf8_bin
    VARIABLE_VALUE: 4044
    SELECT * FROM information_schema.KEY_CACHES \G
    ********************** 1. row **********************
    KEY_CACHE_NAME: default
    SEGMENTS: NULL
    SEGMENT_NUMBER: NULL
         FULL_SIZE: 134217728
        BLOCK_SIZE: 1024
       USED_BLOCKS: 36
     UNUSED_BLOCKS: 107146
      DIRTY_BLOCKS: 0
     READ_REQUESTS: 40305
             READS: 21
    WRITE_REQUESTS: 19239
            WRITES: 358
    SELECT * FROM information_schema.KEY_COLUMN_USAGE LIMIT 1 \G
    ********************** 1. row **********************
               CONSTRAINT_CATALOG: def
                CONSTRAINT_SCHEMA: my_website
                  CONSTRAINT_NAME: PRIMARY
                    TABLE_CATALOG: def
                     TABLE_SCHEMA: users
                      COLUMN_NAME: user_id
                 ORDINAL_POSITION: 1
    POSITION_IN_UNIQUE_CONSTRAINT: NULL
          REFERENCED_TABLE_SCHEMA: NULL
            REFERENCED_TABLE_NAME: NULL
           REFERENCED_COLUMN_NAME: NULL
    SELECT * FROM information_schema.LOCALES;
    +-----+-------+-------------------------------------+-----------------------+---------------------+---------------+--------------+------------------------+
    | ID  | NAME  | DESCRIPTION                         | MAX_MONTH_NAME_LENGTH | MAX_DAY_NAME_LENGTH | DECIMAL_POINT | THOUSAND_SEP | ERROR_MESSAGE_LANGUAGE |
    +-----+-------+-------------------------------------+-----------------------+---------------------+---------------+--------------+------------------------+
    |   0 | en_US | English - United States             |                     9 |                   9 | .             | ,            | english                |
    |   1 | en_GB | English - United Kingdom            |                     9 |                   9 | .             | ,            | english                |
    |   2 | ja_JP | Japanese - Japan                    |                     3 |                   3 | .             | ,            | japanese               |
    |   3 | sv_SE | Swedish - Sweden                    |                     9 |                   7 | ,             |              | swedish                |
    |   4 | de_DE | German - Germany                    |                     9 |                  10 | ,             | .            | german                 |
    |   5 | fr_FR | French - France                     |                     9 |                   8 | ,             |              | french                 |
    |   6 | ar_AE | Arabic - United Arab Emirates       |                     6 |                   8 | .             | ,            | english                |
    |   7 | ar_BH | Arabic - Bahrain                    |                     6 |                   8 | .             | ,            | english                |
    |   8 | ar_JO | Arabic - Jordan                     |                    12 |                   8 | .             | ,            | english                |
    ...
    | 106 | no_NO | Norwegian - Norway                  |                     9 |                   7 | ,             | .            | norwegian              |
    | 107 | sv_FI | Swedish - Finland                   |                     9 |                   7 | ,             |              | swedish                |
    | 108 | zh_HK | Chinese - Hong Kong SAR             |                     3 |                   3 | .             | ,            | english                |
    | 109 | el_GR | Greek - Greece                      |                    11 |                   9 | ,             | .            | greek                  |
    +-----+-------+-------------------------------------+-----------------------+---------------------+---------------+--------------+------------------------+
    CREATE TABLE t (a INT, b INT, c INT);
    INSERT INTO t VALUES (1, 2, 3);
    CREATE TABLE t1 (a_old INT, b_old INT, a_new INT, b_new INT);
    CREATE TABLE t2 (a_old INT, b_old INT, a_new INT, b_new INT); 
    CREATE TRIGGER trigger_before_update BEFORE UPDATE OF a, b ON t 
      FOR EACH ROW INSERT INTO t1 VALUES (OLD.a, OLD.b, NEW.a, NEW.b);
    
    SELECT * FROM INFORMATION_SCHEMA.TRIGGERED_UPDATE_COLUMNS\G 
    *************************** 1. row ***************************
     TRIGGER_CATALOG: def 
    TRIGGER_SCHEMA: test 
    TRIGGER_NAME: trigger_before_update 
    EVENT_OBJECT_CATALOG: def 
    EVENT_OBJECT_SCHEMA: test 
    EVENT_OBJECT_TABLE: t 
    EVENT_OBJECT_COLUMN: a 
    *************************** 2. row *************************** 
    TRIGGER_CATALOG: def 
    TRIGGER_SCHEMA: test 
    TRIGGER_NAME: trigger_before_update 
    EVENT_OBJECT_CATALOG: def 
    EVENT_OBJECT_SCHEMA: test 
    EVENT_OBJECT_TABLE: t 
    EVENT_OBJECT_COLUMN: b
    SET @v1 = 0;
    SET @v2 = 'abc';
    SET @v3 = CAST(123 AS CHAR(5));
    
    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               |
    +---------------+----------------+---------------+--------------------+
    
    SHOW USER_VARIABLES;
    +---------------+-------+
    | Variable_name | Value |
    +---------------+-------+
    | v3            | 123   |
    | v2            | abc   |
    | v1            | 0     |
    +---------------+-------+
    CREATE TABLE parent (f1 TINYINT PRIMARY KEY, f2 TINYINT) engine=innodb;
    CREATE TABLE child (f1 TINYINT PRIMARY KEY, f2 TINYINT, FOREIGN KEY (f2) REFERENCES parent(f1)) engine=innodb;
     
    START TRANSACTION;
    INSERT INTO parent VALUES (1, 2);
    SELECT KEY_STRING, KEY_TYPE FROM INFORMATION_SCHEMA.WSREP_CERT_KEYS;
    +-----------------------------+-----------+
    | KEY_STRING                  | KEY_TYPE  |
    +-----------------------------+-----------+
    | 74657374 706172656E74 0001  | exclusive |
    +-----------------------------+-----------+
    1 row in set (0.001 sec)
    COMMIT; 
     
    START TRANSACTION; 
    INSERT INTO child VALUES (10, 1);
    MariaDB [test]> SELECT KEY_STRING, KEY_TYPE FROM INFORMATION_SCHEMA.WSREP_CERT_KEYS;
    +-----------------------------+-----------+
    | KEY_STRING                  | KEY_TYPE  |
    +-----------------------------+-----------+
    | 74657374 706172656E74 0001  | exclusive |
    | 74657374 706172656E74 0001  | reference |
    | 74657374 6368696C64 000A    | exclusive |
    +-----------------------------+-----------+
    3 rows in set (0.000 sec)
    COMMIT;
    CREATE TABLE parent (f1 TINYINT PRIMARY KEY, f2 TINYINT)engine=innodb;
    update parent set f2=1;
     
    SELECT KEY_STRING, KEY_TYPE FROM INFORMATION_SCHEMA.WSREP_CERT_KEYS;
    +-----------------------------+----------+
    | KEY_STRING                  | KEY_TYPE |
    +-----------------------------+----------+
    | 74657374 706172656E74 0001  | update   |
    +-----------------------------+----------+
    1 row in set (0.001 sec)
    SELECT * FROM INNODB_FT_CONFIG;
    +---------------------------+-------+
    | KEY                       | VALUE |
    +---------------------------+-------+
    | optimize_checkpoint_limit | 180   |
    | synced_doc_id             | 6     |
    | last_optimized_word       |       |
    | deleted_doc_count         | 0     |
    | total_word_count          |       |
    | optimize_start_time       |       |
    | optimize_end_time         |       |
    | stopword_table_name       |       |
    | use_stopword              | 1     |
    | table_state               | 0     |
    +---------------------------+-------+
    SELECT * FROM information_schema.INNODB_FT_DEFAULT_STOPWORD\G
    *************************** 1. row ***************************
    value: a
    *************************** 2. row ***************************
    value: about
    *************************** 3. row ***************************
    value: an
    *************************** 4. row ***************************
    value: are
    ...
    *************************** 36. row ***************************
    value: www
    SELECT * FROM information_schema.INNODB_SYS_FIELDS LIMIT 3\G
    *************************** 1. row ***************************
    INDEX_ID: 11
        NAME: ID
         POS: 0
    *************************** 2. row ***************************
    INDEX_ID: 12
        NAME: FOR_NAME 
         POS: 0
    *************************** 3. row ***************************
    INDEX_ID: 13
        NAME: REF_NAME 
         POS: 0
    3 rows in set (0.00 sec)
    SELECT * FROM INNODB_MUTEXES;
    +------------------------------+---------------------+-------------+----------+
    | NAME                         | CREATE_FILE         | CREATE_LINE | OS_WAITS |
    +------------------------------+---------------------+-------------+----------+
    | &dict_sys->mutex             | dict0dict.cc        |         989 |        2 |
    | &buf_pool->flush_state_mutex | buf0buf.cc          |        1388 |        1 |
    | &log_sys->checkpoint_lock    | log0log.cc          |        1014 |        2 |
    | &block->lock                 | combined buf0buf.cc |        1120 |        1 |
    +------------------------------+---------------------+-------------+----------+
    SELECT * FROM INFORMATION_SCHEMA.WSREP_BF_ABORT_HISTORY LIMIT 100;   
    +----------------------------+---------------+------------------+-----------------+--------------+---------------------+--------------------+------------------+----------------------------+-----------+--------------+-------------+----------+-----------------+----------------+--------------+----------------------------+----------+---------+------------+------------------+
    | TIME                       | VICTIM_TRX_ID | VICTIM_THREAD_ID | VICTIM_QUERY_ID | VICTIM_SEQNO | VICTIM_CLIENT_STATE | VICTIM_CLIENT_MODE | VICTIM_TRX_STATE | VICTIM_LOCK                | BF_TRX_ID | BF_THREAD_ID | BF_QUERY_ID | BF_SEQNO | BF_CLIENT_STATE | BF_CLIENT_MODE | BF_TRX_STATE | BF_LOCK                    | SPACE_ID | PAGE_NO | INDEX_NAME | TABLE_NAME       |
    +----------------------------+---------------+------------------+-----------------+--------------+---------------------+--------------------+------------------+----------------------------+-----------+--------------+-------------+----------+-----------------+----------------+--------------+----------------------------+----------+---------+------------+------------------+
    | 2025-05-14 09:48:31.539207 |        378998 |               94 |         2365214 |         NULL | exec                | local              | executing        | REC|LOCK_X|NOT_GAP|WAITING |    379010 |            1 |     2365229 |   174271 | exec            | high priority  | executing    | REC|LOCK_X|NOT_GAP|WAITING |       12 |       4 | PRIMARY    | `test`.`sbtest1` |
    | 2025-05-14 09:48:31.597005 |        379044 |               81 |         2365344 |         NULL | exec                | local              | certifying       | REC|LOCK_X|NOT_GAP         |    379060 |            1 |     2365419 |   174284 | exec            | high priority  | executing    | REC|LOCK_X|NOT_GAP|WAITING |       12 |       4 | PRIMARY    | `test`.`sbtest1` |
    | 2025-05-14 09:48:31.609301 |        379055 |              104 |         2365412 |         NULL | exec                | local              | certifying       | REC|LOCK_X|NOT_GAP         |    379070 |            1 |     2365445 |   174289 | exec            | high priority  | executing    | REC|LOCK_X|NOT_GAP|WAITING |       12 |       4 | PRIMARY    | `test`.`sbtest1` |
    | 2025-05-14 09:48:31.725899 |        379134 |              101 |         2366437 |         NULL | exec                | local              | executing        | REC|LOCK_X|NOT_GAP         |    379164 |            1 |     2366536 |   174307 | exec            | high priority  | executing    | REC|LOCK_X|NOT_GAP|WAITING |       12 |  147008 | PRIMARY    | `test`.`sbtest1` |
    | 2025-05-14 09:48:31.789128 |        379094 |              131 |         2366355 |         NULL | exec                | local              | certifying       | REC|LOCK_X|NOT_GAP         |    379195 |            1 |     2366599 |   174323 | exec            | high priority  | executing    | REC|LOCK_X|NOT_GAP|WAITING |       12 |       4 | PRIMARY    | `test`.`sbtest1` |
    | 2025-05-14 09:48:31.789140 |        379101 |              124 |         2366103 |         NULL | exec                | local              | executing        | REC|LOCK_X|NOT_GAP|WAITING |    379195 |            1 |     2366599 |   174323 | exec            | high priority  | executing    | REC|LOCK_X|NOT_GAP|WAITING |       12 |       4 | PRIMARY    | `test`.`sbtest1` |
    | 2025-05-14 09:48:31.789145 |        379093 |               82 |         2366113 |         NULL | exec                | local              | executing        | REC|LOCK_X|NOT_GAP|WAITING |    379195 |            1 |     2366599 |   174323 | exec            | high priority  | executing    | REC|LOCK_X|NOT_GAP|WAITING |       12 |       4 | PRIMARY    | `test`.`sbtest1` |
    | 2025-05-14 09:48:31.789148 |        379110 |              117 |         2366193 |         NULL | exec                | local              | executing        | REC|LOCK_X|NOT_GAP|WAITING |    379195 |            1 |     2366599 |   174323 | exec            | high priority  | executing    | REC|LOCK_X|NOT_GAP|WAITING |       12 |       4 | PRIMARY    | `test`.`sbtest1` |
    | 2025-05-14 09:48:31.789152 |        379126 |              111 |         2366201 |         NULL | exec                | local              | executing        | REC|LOCK_X|NOT_GAP|WAITING |    379195 |            1 |     2366599 |   174323 | exec            | high priority  | executing    | REC|LOCK_X|NOT_GAP|WAITING |       12 |       4 | PRIMARY    | `test`.`sbtest1` |
    | 2025-05-14 09:48:31.789156 |        379100 |              134 |         2366318 |         NULL | exec                | local              | executing        | REC|LOCK_X|NOT_GAP|WAITING |    379195 |            1 |     2366599 |   174323 | exec            | high priority  | executing    | REC|LOCK_X|NOT_GAP|WAITING |       12 |       4 | PRIMARY    | `test`.`sbtest1` |
    | 2025-05-14 09:48:31.789159 |        379109 |               93 |         2366334 |         NULL | exec                | local              | executing        | REC|LOCK_X|NOT_GAP|WAITING |    379195 |            1 |     2366599 |   174323 | exec            | high priority  | executing    | REC|LOCK_X|NOT_GAP|WAITING |       12 |       4 | PRIMARY    | `test`.`sbtest1` |
    | 2025-05-14 09:48:31.789163 |        379119 |               90 |         2366384 |         NULL | exec                | local              | executing       +----------------------------+---------------+------------------+-----------------+--------------+---------------------+--------------------+------------------+----------------------------+-----------+--------------+-------------+----------+-----------------+----------------+--------------+----------------------------+----------+---------+------------+------------------+
    ...

    SCHEMA_NAME

    Database name.

    DEFAULT_CHARACTER_SET_NAME

    Default for the database.

    DEFAULT_COLLATION_NAME

    Default .

    SQL_PATH

    Always NULL.

    SCHEMA_COMMENT

    Database comment. From .

    SELECT * FROM INFORMATION_SCHEMA.SCHEMATA\G
    
    SELECT * FROM INFORMATION_SCHEMA.SCHEMATA\G
    
    • CREATE DATABASE

    • ALTER DATABASE

    • DROP DATABASE

    • SHOW CREATE DATABASE

    This page is licensed: CC BY-SA / Gnu FDL

    CATALOG_NAME

    Always def.

    Information Schema

    Example

    See Also

    spinner

    TABLE_SCHEMA

    varchar(192)

    The schema (database) name.

    TABLE_NAME

    varchar(192)

    The table name.

    ROWS_READ

    bigint(21)

    The number of rows read from the table.

    ROWS_CHANGED

    bigint(21)

    The number of rows changed in the table.

    ROWS_CHANGED_X_INDEXES

    bigint(21)

    The number of rows changed in the table, multiplied by the number of indexes changed.

    ROWS_INSERTED

    bigint(21)

    From

    ROWS_UPDATED

    bigint(21)

    From

    ROWS_DELETED

    bigint(21)

    From

    KEY_READ_HITS

    bigint(21)

    From

    KEY_READ_MISSES

    bigint(21)

    From

    This page is licensed: CC BY-SA / Gnu FDL

    Information Schema
    User Statistics
    SELECT * FROM INFORMATION_SCHEMA.TABLE_STATISTICS WHERE TABLE_NAME='user';
    +--------------+------------+-----------+--------------+------------------------+
    | TABLE_SCHEMA | TABLE_NAME | ROWS_READ | ROWS_CHANGED | ROWS_CHANGED_X_INDEXES |
    +--------------+------------+-----------+--------------+------------------------+
    | mysql        | user       |         5 |            2 |                      2 |
    +--------------+------------+-----------+--------------+------------------------+

    Example

    spinner

    WORD

    Word from the text of a column with a fulltext index. Words can appear multiple times in the table, once per DOC_ID and POSITION combination.

    FIRST_DOC_ID

    First document ID where this word appears in the index.

    LAST_DOC_ID

    Last document ID where this word appears in the index.

    DOC_COUNT

    Number of rows containing this word in the index.

    DOC_ID

    Document ID of the newly added row, either an appropriate ID column or an internal InnoDB value.

    Note that for OPTIMIZE TABLE to process InnoDB fulltext index data, the innodb_optimize_fulltext_only system variable needs to be set to 1. When this is done, and an OPTIMIZE TABLE statement run, the INNODB_FT_INDEX_CACHE table will be emptied, and the INNODB_FT_INDEX_TABLE table will be updated.

    This page is licensed: CC BY-SA / Gnu FDL

    Information Schema
    fulltext indexes
    OPTIMIZE TABLE
    INNODB_FT_INDEX_CACHE
    privilege
    innodb_ft_aux_table
    SELECT * FROM INNODB_FT_INDEX_TABLE;
    Empty set (0.00 sec)
    
    SET GLOBAL innodb_optimize_fulltext_only =1;
    
    OPTIMIZE TABLE test.ft_innodb;
    +----------------+----------+----------+----------+
    | Table          | Op       | Msg_type | Msg_text |
    +----------------+----------+----------+----------+
    | test.ft_innodb | optimize | status   | OK       |
    +----------------+----------+----------+----------+
    
    SELECT * FROM INNODB_FT_INDEX_TABLE;
    +------------+--------------+-------------+-----------+--------+----------+
    | WORD       | FIRST_DOC_ID | LAST_DOC_ID | DOC_COUNT | DOC_ID | POSITION |
    +------------+--------------+-------------+-----------+--------+----------+
    | and        |            4 |           5 |         2 |      4 |        0 |
    | and        |            4 |           5 |         2 |      5 |        0 |
    | arrived    |            4 |           4 |         1 |      4 |       20 |
    | ate        |            1 |           5 |         2 |      1 |        4 |
    | ate        |            1 |           5 |         2 |      5 |        8 |
    | everybody  |            1 |           1 |         1 |      1 |        8 |
    | goldilocks |            4 |           4 |         1 |      4 |        9 |
    | hungry     |            3 |           3 |         1 |      3 |        8 |
    | pear       |            5 |           5 |         1 |      5 |       14 |
    | she        |            5 |           5 |         1 |      5 |        4 |
    | then       |            4 |           4 |         1 |      4 |        4 |
    | wicked     |            2 |           2 |         1 |      2 |        4 |
    | witch      |            2 |           2 |         1 |      2 |       11 |
    +------------+--------------+-------------+-----------+--------+----------+

    Examples

    spinner

    TABLE_CATALOG

    Always def.

    TABLE_SCHEMA

    Database name.

    TABLE_NAME

    Table name.

    COLUMN_NAME

    Column name.

    PRIVILEGE_TYPE

    One of SELECT, INSERT, UPDATE or REFERENCES.

    IS_GRANTABLE

    Whether the user has the for this privilege.

    Similar information can be accessed with the SHOW FULL COLUMNS and SHOW GRANTS statements. See the GRANT statement for details about privileges.

    This information is also stored in the columns_priv table, in the mysql system database.

    For a description of the privileges that are shown in this table, see column privileges.

    In the following example, no column-level privilege has been explicitly assigned:

    This page is licensed: CC BY-SA / Gnu FDL

    GRANTEE

    Information Schema
    mysql.columns_priv

    In the format user_name@host_name.

    SELECT * FROM information_schema.COLUMN_PRIVILEGES;
    Empty SET

    Example

    spinner

    ID

    Foreign key index associated with this column, matching the field.

    Prior to , this is preceded by the database name. From MariaDB 12.1, foreign key names are only required to be unique per table, not per database, so the redundant database name is not shown.

    FOR_COL_NAME

    Child column name.

    REF_COL_NAME

    Parent column name.

    POS

    Ordinal position of the column in the table, starting from 0.

    Prior to MariaDB 12.1:

    From MariaDB 12.1:

    This page is licensed: CC BY-SA / Gnu FDL

    Information Schema
    foreign key
    privilege
    SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS\G
    *************************** 1. row ***************************
              ID: test/fk_book_author
    FOR_COL_NAME: author_id
    REF_COL_NAME: id
             POS: 0
    SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS\G
    *************************** 1. row ***************************
              ID: fk_book_author
    FOR_COL_NAME: author_id
    REF_COL_NAME: id
             POS: 0

    Examples

    spinner

    TABLE_SCHEMA

    VARCHAR(192)

    The schema (database) name.

    TABLE_NAME

    VARCHAR(192)

    The table name.

    INDEX_NAME

    VARCHAR(192)

    The index name (as visible in SHOW CREATE TABLE).

    ROWS_READ

    BIGINT(21)

    The number of rows read from this index.

    QUERIES

    BIGINT(21)

    Incremented for each index the query is part of. This assists one to see how effective the index is. From

    SELECT * FROM information_schema.INDEX_STATISTICS 
    WHERE TABLE_NAME = "author";
    +--------------+------------+------------+-----------+
    | TABLE_SCHEMA | TABLE_NAME | INDEX_NAME | ROWS_READ |
    +--------------+------------+------------+-----------+
    | books        | author     | by_name    |        15 |
    +--------------+------------+------------+-----------+

    Example

    spinner

    PAGE_SIZE

    Compressed page size, in bytes. This value is unique in the table; other values are totals which refer to pages of this size.

    BUFFER_POOL_INSTANCE

    Buffer Pool identifier. From returns a value of 0, since multiple InnoDB buffer pool instances has been removed.

    PAGES_USED

    Number of pages of the size PAGE_SIZE which are currently in the buffer pool.

    PAGES_FREE

    Number of pages of the size PAGE_SIZE which are currently free, and thus are available for allocation. This value represents the buffer pool's fragmentation. A totally unfragmented buffer pool has at most 1 free page.

    RELOCATION_OPS

    How many times a page of the size PAGE_SIZE has been relocated. This happens when data exceeds a page (because a row must be copied into a new page) and when two pages are merged (because their data shrunk and can now be contained in one page).

    RELOCATION_TIME

    Time (in seconds) spent in relocation operations for pages of the size PAGE_SIZE. This column is reset when the INNODB_CMPMEM_RESET table is queried.

    SELECT * FROM information_schema.INNODB_CMPMEM\G
    ********************** 1. row **********************
                page_size: 1024
     buffer_pool_instance: 0
               pages_used: 0
               pages_free: 0
          reloacation_ops: 0
          relocation_time: 0

    Example

    See Also

    INNODB_CMP and INNODB_CMP_RESET
    INNODB_CMP_PER_INDEX and INNODB_CMP_PER_INDEX_RESET
    spinner
    max_password_errors
    INNODB_SYS_TABLES.SPACE

    Information Schema COLLATIONS Table

    The Information Schema COLLATIONS table contains a list of supported collations, indicating their associated character sets and compilation status.

    The Information Schema COLLATIONS table contains a list of supported collations.

    It contains the following columns:

    Column
    Description

    COLLATION_NAME

    Name of the collation.

    The statement returns the same results and both can be reduced in a similar way.

    The following two statements return the same results:

    The following two statements return the same results:

    NO PAD collations regard trailing spaces as normal characters. You can get a list of all NO PAD collations as follows:

    In comparisons, NO PAD collations evaluate to 0 (FALSE). Example:

    PAD SPACE collations pad strings to equal lengths in comparisons, so that the comparison evaluates to 1 (TRUE). Example:

    • - specifying the character set at the server, database, table and column levels

    • - full list of supported characters sets and collations.

    This page is licensed: CC BY-SA / Gnu FDL

    Information Schema ENGINES Table

    The Information Schema ENGINES table displays status information about the server's storage engines, including support level and transaction capabilities.

    The Information Schema ENGINES table displays status information about the server's storage engines.

    It contains the following columns:

    Column
    Description

    ENGINE

    Name of the storage engine.

    It provides identical information to the statement. Since storage engines are plugins, different information about them is also shown in the table and by the statement.

    The table is not a standard Information Schema table, and is a MySQL and MariaDB extension.

    Note that both MySQL's InnoDB and Percona's XtraDB replacement are labeled as InnoDB. However, if XtraDB is in use, it will be specified in the COMMENT field. See . The same applies to .

    Check if a given storage engine is available:

    Check which storage engine supports XA transactions:

    This page is licensed: CC BY-SA / Gnu FDL

    Information Schema EVENTS Table

    The Information Schema EVENTS table stores information about scheduled events on the server, including their timing, definition, and status.

    The Information Schema EVENTS table stores information about Events on the server.

    It contains the following columns:

    Column
    Description

    EVENT_CATALOG

    Always def.

    The and statements provide similar information.

    This page is licensed: CC BY-SA / Gnu FDL

    Information Schema QUERY_CACHE_INFO Table

    The Information Schema QUERY_CACHE_INFO table shows all queries currently stored in the query cache, aiding in cache performance analysis.

    Description

    This table is not a standard Information Schema table, but a MariaDB extension.

    The QUERY_CACHE_INFO table is created by the QUERY_CACHE_INFO plugin, and allows you to see the contents of the query cache. It creates a table in the information_schema database that shows all queries that are in the cache. You must have the PROCESS privilege (see GRANT) to use this table.

    It contains the following columns:

    Column
    Description

    For example:

    This page is licensed: CC BY-SA / Gnu FDL

    Information Schema SEQUENCES Table

    The Information Schema SEQUENCES table provides metadata about sequence objects, including their minimum, maximum, and current values.

    This table is available as of MariaDB .

    The Information Schema SEQUENCES table stores information about sequences on the server.

    It contains the following columns. See CREATE SEQUENCE for details.

    Column
    Description

    SEQUENCE_CATALOG

    This page is licensed: CC BY-SA / Gnu FDL

    Information Schema STATISTICS Table

    The Information Schema STATISTICS table provides information about table indexes, serving as a standard-compliant alternative to SHOW INDEX.

    The Information Schema STATISTICS table provides information about table indexes.

    It contains the following columns:

    Column
    Description

    TABLE_CATALOG

    Always def.

    The statement produces similar output.

    This page is licensed: CC BY-SA / Gnu FDL

    Information Schema SYSTEM_VARIABLES Table

    The Information Schema SYSTEM_VARIABLES table contains all system variables and their current global or session values.

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

    It contains the following columns:

    Column
    Description

    VARIABLE_NAME

    System variable name.

    This query shows variables used in your server deployment that are deprecated:

    This page is licensed: CC BY-SA / Gnu FDL

    Information Schema INNODB_LOCKS Table

    The INNODB_LOCKS table provides information about locks that a transaction has requested but not yet obtained, or locks that are blocking another transaction.

    The Information Schema INNODB_LOCKS table stores information about locks that InnoDB transactions have requested but not yet acquired, or that are blocking another transaction.

    It has the following columns:

    Column
    Description

    LOCK_ID

    The table is often used in conjunction with the and tables to diagnose problematic locks and transactions

    .

    This page is licensed: CC BY-SA / Gnu FDL

    Information Schema INNODB_SYS_COLUMNS Table

    The INNODB_SYS_COLUMNS table contains metadata about InnoDB table columns, derived directly from the internal InnoDB data dictionary.

    The Information Schema INNODB_SYS_COLUMNS table contains information about InnoDB fields.

    The PROCESS privilege is required to view the table.

    It has the following columns:

    Column
    Description

    The column MTYPE uses a numeric column type identifier, which has the following values:

    Column Type Identifier
    Description

    This page is licensed: CC BY-SA / Gnu FDL

    Information Schema INNODB_SYS_FOREIGN Table

    The INNODB_SYS_FOREIGN table provides metadata about foreign key constraints defined on InnoDB tables, including reference details.

    The Information Schema INNODB_SYS_FOREIGN table contains information about InnoDB foreign keys.

    The PROCESS privilege is required to view the table.

    It has the following columns:

    Column
    Description

    The TYPE column provides a bit flag with information about the foreign key. This information is OR'ed together to read:

    Bit Flag
    Description

    Prior to :

    From MariaDB 12.1:

    This page is licensed: CC BY-SA / Gnu FDL

    Information Schema CHECK_CONSTRAINTS Table

    The Information Schema CHECK_CONSTRAINTS table stores metadata about the constraints defined for tables in all databases, including the check clause.

    The CHECK_CONSTRAINTS table stores metadata about the defined for tables in all databases.

    It contains the following columns:

    Column
    Description

    Information Schema GEOMETRY_COLUMNS Table

    The Information Schema GEOMETRY_COLUMNS table describes the geometry columns in tables, providing details on spatial reference systems and geometry types.

    The GEOMETRY_COLUMNS table provides support for Spatial Reference systems for GIS data.

    It contains the following columns:

    Column
    Type
    Null
    Description

    Information Schema ROUTINES Table

    The Information Schema ROUTINES table stores information about stored procedures and stored functions, including their definitions and properties.

    The ROUTINES table stores information about and .

    It contains the following columns:

    Column
    Description

    Information Schema TRIGGERS Table

    The Information Schema TRIGGERS table contains detailed information about triggers, including the event, timing, and action statement.

    The TRIGGERS table contains information about .

    It has the following columns:

    Column
    Description

    Information Schema INNODB_BUFFER_PAGE_LRU Table

    The Information Schema INNODB_BUFFER_PAGE_LRU table details pages in the buffer pool and their position in the LRU eviction list.

    The INNODB_BUFFER_PAGE_LRU table contains information about pages in the and how they are ordered for eviction purposes.

    The PROCESS is required to view the table.

    It has the following columns:

    Column
    Description

    Information Schema INNODB_FT_INDEX_CACHE Table

    The INNODB_FT_INDEX_CACHE table displays token information from newly inserted rows in a FULLTEXT index before the data is flushed to disk.

    The INNODB_FT_INDEX_CACHE table contains information about rows that have recently been inserted into an InnoDB . To avoid re-organizing the fulltext index each time a change is made, which would be very expensive, new changes are stored separately and only integrated when an is run.

    The SUPER is required to view the table, and it also requires the system variable to be set.

    It has the following columns:

    Column
    Description

    Information Schema TABLESPACES Table

    The Information Schema TABLESPACES table provides information about active tablespaces, specifically for the InnoDB storage engine.

    The TABLESPACES table contains information about active tablespaces..

    The table is a MariaDB and MySQL extension, and does not include information about InnoDB tablespaces.

    Column
    Description

    POSITION

    Position of this word instance within the DOC_ID, as an offset added to the previous POSITION instance.

    EVENT_SCHEMA

    Database where the event was defined.

    EVENT_NAME

    Event name.

    DEFINER

    Event definer.

    TIME_ZONE

    Time zone used for the event's scheduling and execution, by default SYSTEM.

    EVENT_BODY

    SQL.

    EVENT_DEFINITION

    The SQL defining the event.

    EVENT_TYPE

    Either ONE TIME or RECURRING.

    EXECUTE_AT

    DATETIME when the event is set to execute, or NULL if recurring.

    INTERVAL_VALUE

    Numeric interval between event executions for a recurring event, or NULL if not recurring.

    INTERVAL_FIELD

    Interval unit (e.g., HOUR)

    SQL_MODE

    The SQL_MODE at the time the event was created.

    STARTS

    Start DATETIME for a recurring event, NULL if not defined or not recurring.

    ENDS

    End DATETIME for a recurring event, NULL if not defined or not recurring.

    STATUS

    One of ENABLED, DISABLED or /SLAVESIDE_DISABLED.

    ON_COMPLETION

    The ON COMPLETION clause, either PRESERVE or NOT PRESERVE .

    CREATED

    When the event was created.

    LAST_ALTERED

    When the event was last changed.

    LAST_EXECUTED

    When the event was last run.

    EVENT_COMMENT

    The comment provided in the CREATE EVENT statement, or an empty string if none.

    ORIGINATOR

    MariaDB server ID on which the event was created.

    CHARACTER_SET_CLIENT

    character_set_client system variable session value at the time the event was created.

    COLLATION_CONNECTION

    collation_connection system variable session value at the time the event was created.

    DATABASE_COLLATION

    Database collation with which the event is linked.

    SHOW EVENTS
    SHOW CREATE EVENT
    spinner
    GRANT OPTION

    ENGINE

    TABLESPACE_TYPE

    LOGFILE_GROUP_NAME

    EXTENT_SIZE

    AUTOEXTEND_SIZE

    MAXIMUM_SIZE

    NODEGROUP_ID

    TABLESPACE_COMMENT

    This page is licensed: CC BY-SA / Gnu FDL

    TABLESPACE_NAME

    Information Schema

    spinner

    SUPPORT

    Whether the engine is the default, or is supported or not.

    COMMENT

    Storage engine comments.

    TRANSACTIONS

    Whether or not the engine supports transactions.

    XA

    Whether or not the engine supports XA transactions.

    SAVEPOINTS

    Whether or not savepoints are supported.

    Example

    SHOW ENGINES
    information_schema.PLUGINS
    SHOW PLUGINS
    XtraDB and InnoDB
    FederatedX
    spinner

    STATEMENT_SCHEMA

    Database used when query was included

    STATEMENT_TEXT

    Query text

    RESULT_BLOCKS_COUNT

    Number of result blocks

    RESULT_BLOCKS_SIZE

    Size in bytes of result blocks

    RESULT_BLOCKS_SIZE_USED

    Size in bytes of used blocks

    LIMIT

    MAX_SORT_LENGTH

    GROUP_CONCAT_MAX_LENGTH

    CHARACTER_SET_CLIENT

    CHARACTER_SET_RESULT

    COLLATION

    TIMEZONE

    DEFAULT_WEEK_FORMAT

    DIV_PRECISION_INCREMENT

    SQL_MODE

    LC_TIME_NAMES

    CLIENT_LONG_FLAG

    CLIENT_PROTOCOL_41

    PROTOCOL_TYPE

    MORE_RESULTS_EXISTS

    IN_TRANS

    AUTOCOMMIT

    PACKET_NUMBER

    HITS

    Incremented each time the query cache is hit.

    spinner

    SESSION_VALUE

    Session value of the variable or NULL if the variable only has a global scope.

    GLOBAL_VALUE

    Global value of the variable or NULL if the variable only has a session scope.

    GLOBAL_VALUE_ORIGIN

    How the global value is set — a compile-time default, auto-configured by the server, configuration file (or on a command line), with the SQL statement.

    DEFAULT_VALUE

    Compile-time default value of the variable.

    VARIABLE_SCOPE

    Global, session, or session-only.

    VARIABLE_TYPE

    Data type of the variable value.

    VARIABLE_COMMENT

    Help text, usually shown in mariadbd --help --verbose.

    NUMERIC_MIN_VALUE

    For numeric variables — minimal allowed value.

    NUMERIC_MAX_VALUE

    For numeric variables — maximal allowed value.

    NUMERIC_BLOCK_SIZE

    For numeric variables — a valid value must be a multiple of the "block size".

    ENUM_VALUE_LIST

    For ENUM, SET, and FLAGSET variables — the list of recognized values.

    READ_ONLY

    Whether 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_ARGUMENT

    Whether an argument is required when setting the variable on the command line. NULL when a variable can not be set on the command line.

    GLOBAL_VALUE_PATH

    Which config file the variable got its value from. NULL if not set in any config file.

    IS_DEPRECATED

    Used to identify deprecated variables in the server configuration (in an option file or on the command line). Available from MariaDB 13.0.

    DEPRECATED_REPLACEMENT

    The replacement of a deprecated variable. If NULL, there is no replacement. Available from MariaDB 13.0.

    Examples

    Show Values of a Specific Variable

    Show Deprecated Variables That are set in the Configuration File

    spinner

    Lock ID number - the format is not fixed, so do not rely upon the number for information.

    LOCK_TRX_ID

    Lock's transaction ID. Matches the INNODB_TRX.TRX_ID column.

    LOCK_MODE

    Lock mode. One of S (shared), X (exclusive), IS (intention shared), IX (intention exclusive row lock), S_GAP (shared gap lock), X_GAP (exclusive gap lock), IS_GAP (intention shared gap lock), IX_GAP (intention exclusive gap lock) or AUTO_INC (auto-increment table level lock).

    LOCK_TYPE

    Whether the lock is RECORD (row level) or TABLE level.

    LOCK_TABLE

    Name of the locked table,or table containing locked rows.

    LOCK_INDEX

    Index name if a RECORD LOCK_TYPE, or NULL if not.

    LOCK_SPACE

    Tablespace ID if a RECORD LOCK_TYPE, or NULL if not.

    LOCK_PAGE

    Locked record page number if a RECORD LOCK_TYPE, or NULL if not.

    LOCK_REC

    Locked record heap number if a RECORD LOCK_TYPE, or NULL if not.

    LOCK_DATA

    Locked record primary key as an SQL string if a RECORD LOCK_TYPE, or NULL if not. If no primary key exists, the internal InnoDB row_id number is instead used. To avoid unnecessary IO, also NULL if the locked record page is not in the buffer pool

    Example

    INNODB_LOCK_WAITS
    INNODB_TRX
    spinner
    SELECT * FROM information_schema.ENGINES\G;
    *************************** 1. row ***************************
          ENGINE: InnoDB
         SUPPORT: DEFAULT
         COMMENT: Supports transactions, row-level locking, and foreign keys
    TRANSACTIONS: YES
              XA: YES
      SAVEPOINTS: YES
    *************************** 2. row ***************************
          ENGINE: CSV
         SUPPORT: YES
         COMMENT: CSV storage engine
    TRANSACTIONS: NO
              XA: NO
      SAVEPOINTS: NO
    *************************** 3. row ***************************
          ENGINE: MyISAM
         SUPPORT: YES
         COMMENT: MyISAM storage engine
    TRANSACTIONS: NO
              XA: NO
      SAVEPOINTS: NO
    *************************** 4. row ***************************
          ENGINE: BLACKHOLE
         SUPPORT: YES
         COMMENT: /dev/null storage engine (anything you write to it disappears)
    TRANSACTIONS: NO
              XA: NO
      SAVEPOINTS: NO
    *************************** 5. row ***************************
          ENGINE: FEDERATED
         SUPPORT: YES
         COMMENT: FederatedX pluggable storage engine
    TRANSACTIONS: YES
              XA: NO
      SAVEPOINTS: YES
    *************************** 6. row ***************************
          ENGINE: MRG_MyISAM
         SUPPORT: YES
         COMMENT: Collection of identical MyISAM tables
    TRANSACTIONS: NO
              XA: NO
      SAVEPOINTS: NO
    *************************** 7. row ***************************
          ENGINE: ARCHIVE
         SUPPORT: YES
         COMMENT: Archive storage engine
    TRANSACTIONS: NO
              XA: NO
      SAVEPOINTS: NO
    *************************** 8. row ***************************
          ENGINE: MEMORY
         SUPPORT: YES
         COMMENT: Hash based, stored in memory, useful for temporary tables
    TRANSACTIONS: NO
              XA: NO
      SAVEPOINTS: NO
    *************************** 9. row ***************************
          ENGINE: PERFORMANCE_SCHEMA
         SUPPORT: YES
         COMMENT: Performance Schema
    TRANSACTIONS: NO
              XA: NO
      SAVEPOINTS: NO
    *************************** 10. row ***************************
          ENGINE: Aria
         SUPPORT: YES
         COMMENT: Crash-safe tables with MyISAM heritage
    TRANSACTIONS: NO
              XA: NO
      SAVEPOINTS: NO
    10 rows in set (0.00 sec)
    SELECT SUPPORT FROM information_schema.ENGINES WHERE ENGINE LIKE 'tokudb';
    Empty SET
    SELECT ENGINE FROM information_schema.ENGINES WHERE XA = 'YES';
    +--------+
    | ENGINE |
    +--------+
    | InnoDB |
    +--------+
    SELECT * FROM information_schema.QUERY_CACHE_INFO;
    +------------------+-----------------+---------------------+--------------------+-------------------------+
    | STATEMENT_SCHEMA | STATEMENT_TEXT  | RESULT_BLOCKS_COUNT | RESULT_BLOCKS_SIZE | RESULT_BLOCKS_SIZE_USED |
    +------------------+-----------------+---------------------+--------------------+-------------------------+
    ...
    | test             | SELECT * FROM a |                   1 |                512 |                     143 |
    | test             | select * FROM a |                   1 |                512 |                     143 |
    ...
    +------------------+-----------------+---------------------+--------------------+-------------------------
    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
            IS_DEPRECATED: NO
    SELECT VARIABLE_NAME, GLOBAL_VALUE, DEFAULT_VALUE 
     FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES 
     WHERE GLOBAL_VALUE_ORIGIN='CONFIG' AND IS_DEPRECATED = 'YES';
     -- Possible output
    +-----------------------+--------------+---------------+
    | VARIABLE_NAME         | GLOBAL_VALUE | DEFAULT_VALUE |
    +-----------------------+--------------+---------------+
    | INNODB_LRU_FLUSH_SIZE | 0            | 32            |
    +-----------------------+--------------+---------------+
    -- session 1
    START TRANSACTION;
    UPDATE t SET id = 15 WHERE id = 10;
    
    -- session 2
    DELETE FROM t WHERE id = 10;
    
    -- session 1
    USE information_schema;
    SELECT l.*, t.*
        FROM information_schema.INNODB_LOCKS l
        JOIN information_schema.INNODB_TRX t
            ON l.lock_trx_id = t.trx_id
        WHERE trx_state = 'LOCK WAIT' \G
    *************************** 1. row ***************************
                       lock_id: 840:40:3:2
                   lock_trx_id: 840
                     lock_mode: X
                     lock_type: RECORD
                    lock_table: `test`.`t`
                    lock_index: PRIMARY
                    lock_space: 40
                     lock_page: 3
                      lock_rec: 2
                     lock_data: 10
                        trx_id: 840
                     trx_state: LOCK WAIT
                   trx_started: 2019-12-23 18:43:46
         trx_requested_lock_id: 840:40:3:2
              trx_wait_started: 2019-12-23 18:43:46
                    trx_weight: 2
           trx_mysql_thread_id: 46
                     trx_query: DELETE FROM t WHERE id = 10
           trx_operation_state: starting index read
             trx_tables_in_use: 1
             trx_tables_locked: 1
              trx_lock_structs: 2
         trx_lock_memory_bytes: 1136
               trx_rows_locked: 1
             trx_rows_modified: 0
       trx_concurrency_tickets: 0
           trx_isolation_level: REPEATABLE READ
             trx_unique_checks: 1
        trx_foreign_key_checks: 1
    trx_last_foreign_key_error: NULL
              trx_is_read_only: 0
    trx_autocommit_non_locking: 0

    NEXT VALUE FOR

  • PREVIOUS VALUE FOR

  • SETVAL(). Set next value for the sequence.

  • AUTO INCREMENT

  • Sequence Storage Engine

  • Catalog name

    SEQUENCE_SCHEMA

    Database name

    SEQUENCE_NAME

    Sequence name

    DATA_TYPE

    Data type, for example BIGINT or TINYINT UNSIGNED

    NUMERIC_PRECISION

    NUMERIC_PRECISION_RADIX

    NUMERIC_SCALE

    START_VALUE

    MINIMUM_VALUE

    MAXIMUM_VALUE

    INCREMENT

    CYCLE_OPTION

    1 if the CYCLE OPTION is set, otherwise 0

    CREATE SEQUENCE s START WITH 100 INCREMENT BY 10;
    
    SELECT * FROM INFORMATION_SCHEMA.SEQUENCES\G
    *************************** 1. row ***************************
           SEQUENCE_CATALOG: def
            SEQUENCE_SCHEMA: test
              SEQUENCE_NAME: s
                  DATA_TYPE: bigint
          NUMERIC_PRECISION: 64
    NUMERIC_PRECISION_RADIX: 2
              NUMERIC_SCALE: 0
                START_VALUE: 100
              MINIMUM_VALUE: 1
              MAXIMUM_VALUE: 9223372036854775806
                  INCREMENT: 10
               CYCLE_OPTION: 0

    Example

    See Also

    Sequence Overview
    CREATE SEQUENCE
    ALTER SEQUENCE
    DROP SEQUENCE
    spinner

    5

    6

    7

    SYS_CHILD

    8

    SYS

    9

    10

    11

    12

    VARMYSQL

    13

    MYSQL

    TABLE_ID

    Table identifier, matching the value from INNODB_SYS_TABLES.TABLE_ID.

    NAME

    Column name.

    POS

    Ordinal position of the column in the table, starting from 0. This value is adjusted when columns are added or removed.

    MTYPE

    Numeric column type identifier, (see the table below for an explanation of its values).

    PRTYPE

    Binary value of the InnoDB precise type, representing the data type, character set code and nullability.

    LEN

    Column length. For multi-byte character sets, represents the length in bytes.

    1

    VARCHAR

    2

    CHAR

    3

    FIXBINARY

    SELECT * FROM information_schema.INNODB_SYS_COLUMNS LIMIT 3\G
    *************************** 1. row ***************************
    TABLE_ID: 11
        NAME: ID
         POS: 0
       MTYPE: 1
      PRTYPE: 524292
         LEN: 0
    *************************** 2. row ***************************
    TABLE_ID: 11
        NAME: FOR_NAME 
         POS: 0
       MTYPE: 1
      PRTYPE: 524292
        LEN: 0
    *************************** 3. row ***************************
    TABLE_ID: 11
        NAME: REF_NAME 
         POS: 0
       MTYPE: 1
      PRTYPE: 524292
         LEN: 0
    3 rows in set (0.00 sec)

    Example

    spinner

    4

    ON UPDATE SET NULL

    16

    ON DELETE NO ACTION

    32

    ON UPDATE NO ACTION

    ID

    Foreign key name. Prior to , this is preceded by the database name. From MariaDB 12.1, foreign key names are only required to be unique per table, not per database, so the redundant database name is not shown.

    FOR_NAME

    Database and table name of the foreign key child.

    REF_NAME

    Database and table name of the foreign key parent.

    N_COLS

    Number of foreign key index columns.

    TYPE

    Bit flag providing information about the foreign key.

    1

    ON DELETE CASCADE

    2

    ON UPDATE SET NULL

    4

    ON UPDATE CASCADE

    ELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN\G
    *************************** 1. row ***************************
          ID: test/fk_book_author
    FOR_NAME: test/book
    REF_NAME: test/author
      N_COLS: 1
        TYPE: 1
    ...
    SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN\G
    *************************** 1. row ***************************
          ID: fk_book_author
    FOR_NAME: test/book
    REF_NAME: test/author
      N_COLS: 1
        TYPE: 1

    Example

    spinner

    8

    ...
    *************************** 2. row ***************************
    CATALOG_NAME: def
    SCHEMA_NAME: presentations
    DEFAULT_CHARACTER_SET_NAME: latin1
    DEFAULT_COLLATION_NAME: latin1_swedish_ci
    SQL_PATH: NULL
    SCHEMA_COMMENT: Presentations for conferences
    ...
    *************************** 1. row ***************************
    CATALOG_NAME: def
    SCHEMA_NAME: information_schema
    DEFAULT_CHARACTER_SET_NAME: utf8
    DEFAULT_COLLATION_NAME: utf8_general_ci
    SQL_PATH: NULL
    *************************** 2. row ***************************
    CATALOG_NAME: def
    SCHEMA_NAME: mysql
    DEFAULT_CHARACTER_SET_NAME: latin1
    DEFAULT_COLLATION_NAME: latin1_swedish_ci
    SQL_PATH: NULL
    *************************** 3. row ***************************
    CATALOG_NAME: def
    SCHEMA_NAME: performance_schema
    DEFAULT_CHARACTER_SET_NAME: utf8
    DEFAULT_COLLATION_NAME: utf8_general_ci
    SQL_PATH: NULL
    *************************** 4. row ***************************
    CATALOG_NAME: def
    SCHEMA_NAME: test
    DEFAULT_CHARACTER_SET_NAME: latin1
    DEFAULT_COLLATION_NAME: latin1_swedish_ci
    SQL_PATH: NULL
    ...
    SHOW DATABASES
    Character Sets and Collations
    character set
    collation

    CONSTRAINT_SCHEMA

    Database name.

    CONSTRAINT_NAME

    Constraint name.

    TABLE_NAME

    Table name.

    LEVEL

    Type of the constraint ('Column' or 'Table'). From .

    CHECK_CLAUSE

    Constraint clause.

    A table with a numeric table check constraint and with a default check constraint name:

    To see check constraint call check_constraints table from information schema.

    A new table check constraint called a_upper:

    A new table tt with a field check constraint called b , as well as a table check constraint called b_upper:

    Note: The name of the field constraint is the same as the field name.

    After dropping the default table constraint called CONSTRAINT_1:

    Trying to insert invalid arguments into table t and tt generates an error.

    This page is licensed: CC BY-SA / Gnu FDL

    CONSTRAINT_CATALOG

    Information Schema
    constraints

    Always contains the string 'def'.

    CREATE TABLE t ( a INT, CHECK (a>10));
    SELECT * FROM INFORMATION_SCHEMA.CHECK_CONSTRAINTS\G
    *************************** 1. row ***************************
    CONSTRAINT_CATALOG: def
     CONSTRAINT_SCHEMA: test
       CONSTRAINT_NAME: CONSTRAINT_1
            TABLE_NAME: t
          CHECK_CLAUSE: `a` > 10
    ALTER TABLE t ADD CONSTRAINT a_upper CHECK (a<100);
    SELECT * FROM INFORMATION_SCHEMA.CHECK_CONSTRAINTS\G
    *************************** 1. row ***************************
    CONSTRAINT_CATALOG: def
     CONSTRAINT_SCHEMA: test
       CONSTRAINT_NAME: CONSTRAINT_1
            TABLE_NAME: t
          CHECK_CLAUSE: `a` > 10
    *************************** 2. row ***************************
    CONSTRAINT_CATALOG: def
     CONSTRAINT_SCHEMA: test
       CONSTRAINT_NAME: a_upper
            TABLE_NAME: t
          CHECK_CLAUSE: `a` < 100
    CREATE TABLE tt(b INT CHECK(b>0),CONSTRAINT b_upper CHECK(b<50));
    
    SELECT * FROM INFORMATION_SCHEMA.CHECK_CONSTRAINTS;
    +--------------------+-------------------+-----------------+------------+--------------+
    | CONSTRAINT_CATALOG | CONSTRAINT_SCHEMA | CONSTRAINT_NAME | TABLE_NAME | CHECK_CLAUSE |
    +--------------------+-------------------+-----------------+------------+--------------+
    | def                | test              | b               | tt         | `b` > 0      |
    | def                | test              | b_upper         | tt         | `b` < 50     |
    | def                | test              | CONSTRAINT_1    | t          | `a` > 10     |
    | def                | test              | a_upper         | t          | `a` < 100    |
    +--------------------+-------------------+-----------------+------------+--------------+
    ALTER TABLE t DROP CONSTRAINT CONSTRAINT_1;
    
    SELECT * FROM INFORMATION_SCHEMA.CHECK_CONSTRAINTS;
    +--------------------+-------------------+-----------------+------------+--------------+
    | CONSTRAINT_CATALOG | CONSTRAINT_SCHEMA | CONSTRAINT_NAME | TABLE_NAME | CHECK_CLAUSE |
    +--------------------+-------------------+-----------------+------------+--------------+
    | def                | test              | b               | tt         | `b` > 0      |
    | def                | test              | b_upper         | tt         | `b` < 50     |
    | def                | test              | a_upper         | t          | `a` < 100    |
    +--------------------+-------------------+-----------------+------------+--------------+
    INSERT INTO t VALUES (10),(20),(100);
    ERROR 4025 (23000): CONSTRAINT `a_upper` failed for `test`.`t`
    
    INSERT INTO tt VALUES (10),(-10),(100);
    ERROR 4025 (23000): CONSTRAINT `b` failed for `test`.`tt`
    
    INSERT INTO tt VALUES (10),(20),(100);
    ERROR 4025 (23000): CONSTRAINT `b_upper` failed for `test`.`tt`
    CREATE TABLE majra(CHECK(x>0), x INT, y INT CHECK(y < 0), z INT,
                                  CONSTRAINT z CHECK(z>0), CONSTRAINT xyz CHECK(x<10 AND y<10 AND z<10));
    Query OK, 0 rows affected (0.036 sec)
    
    SHOW CREATE TABLE majra;
    +-------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | Table | Create Table                                                                                                                                                                                                                                                                                                   |
    +-------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | majra | CREATE TABLE `majra` (
      `x` int(11) DEFAULT NULL,
      `y` int(11) DEFAULT NULL CHECK (`y` < 0),
      `z` int(11) DEFAULT NULL,
      CONSTRAINT `CONSTRAINT_1` CHECK (`x` > 0),
      CONSTRAINT `z` CHECK (`z` > 0),
      CONSTRAINT `xyz` CHECK (`x` < 10 AND `y` < 10 AND `z` < 10)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
    +-------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    1 row in set (0.000 sec)
    
    
    SELECT * FROM information_schema.check_constraints WHERE table_name='majra';
    +--------------------+-------------------+------------+-----------------+--------+------------------------------------+
    | CONSTRAINT_CATALOG | CONSTRAINT_SCHEMA | TABLE_NAME | CONSTRAINT_NAME | LEVEL  | CHECK_CLAUSE                       |
    +--------------------+-------------------+------------+-----------------+--------+------------------------------------+
    | def                | test              | majra      | y               | Column | `y` < 0                            |
    | def                | test              | majra      | CONSTRAINT_1    | Table  | `x` > 0                            |
    | def                | test              | majra      | z               | Table  | `z` > 0                            |
    | def                | test              | majra      | xyz             | Table  | `x` < 10 and `y` < 10 and `z` < 10 |
    +--------------------+-------------------+------------+-----------------+--------+------------------------------------+
    4 rows in set (0.001 sec)

    Example

    The following statement can be performed from MariaDB 10.5.10.

    spinner

    VARCHAR(512)

    NO

    Together with F_TABLE_SCHEMA and F_TABLE_NAME, the fully qualified name of the featured table containing the geometry column.

    F_TABLE_SCHEMA

    VARCHAR(64)

    NO

    Together with F_TABLE_CATALOG and F_TABLE_NAME, the fully qualified name of the featured table containing the geometry column.

    F_TABLE_NAME

    VARCHAR(64)

    NO

    Together with F_TABLE_CATALOG and F_TABLE_SCHEMA, the fully qualified name of the featured table containing the geometry column.

    F_GEOMETRY_COLUMN

    VARCHAR(64)

    NO

    Name of the column in the featured table that is the geometry golumn.

    G_TABLE_CATALOG

    VARCHAR(512)

    NO

    G_TABLE_SCHEMA

    VARCHAR(64)

    NO

    Database name of the table implementing the geometry column.

    G_TABLE_NAME

    VARCHAR(64)

    NO

    Table name that is implementing the geometry column.

    G_GEOMETRY_COLUMN

    VARCHAR(64)

    NO

    STORAGE_TYPE

    TINYINT(2)

    NO

    Binary geometry implementation. Always 1 in MariaDB.

    GEOMETRY_TYPE

    INT(7)

    NO

    Integer reflecting the type of geometry stored in this column (see table below).

    COORD_DIMENSION

    TINYINT(2)

    NO

    Number of dimensions in the spatial reference system. Always 2 in MariaDB.

    MAX_PPR

    TINYINT(2)

    NO

    Always 0 in MariaDB.

    SRID

    SMALLINT(5)

    NO

    ID of the Spatial Reference System used for the coordinate geometry in this table. It is a foreign key reference to the .

    The integers in the storage_type field match the geometry types as follows:

    Integer
    Type

    0

    GEOMETRY

    1

    POINT

    3

    LINESTRING

    5

    • The SPATIAL_REF_SYS table.

    This page is licensed: CC BY-SA / Gnu FDL

    Description

    Information Schema

    F_TABLE_CATALOG

    CREATE TABLE g1(g GEOMETRY(9,4) REF_SYSTEM_ID=101);
    
    SELECT * FROM information_schema.GEOMETRY_COLUMNS\G
    *************************** 1. row ***************************
      F_TABLE_CATALOG: def
       F_TABLE_SCHEMA: test
         F_TABLE_NAME: g1
    F_GEOMETRY_COLUMN: 
      G_TABLE_CATALOG: def
       G_TABLE_SCHEMA: test
         G_TABLE_NAME: g1
    G_GEOMETRY_COLUMN: g
         STORAGE_TYPE: 1
        GEOMETRY_TYPE: 0
      COORD_DIMENSION: 2
              MAX_PPR: 0
                 SRID: 101

    Storage_type

    Example

    See also

    spinner

    ROUTINE_CATALOG

    Always def.

    ROUTINE_SCHEMA

    Database name associated with the routine.

    ROUTINE_NAME

    Name of the routine.

    ROUTINE_TYPE

    Whether the routine is a PROCEDURE or a FUNCTION.

    DATA_TYPE

    The return value's (for stored functions).

    CHARACTER_MAXIMUM_LENGTH

    Maximum length.

    CHARACTER_OCTET_LENGTH

    Same as the CHARACTER_MAXIMUM_LENGTH except for multi-byte .

    NUMERIC_PRECISION

    For numeric types, the precision (number of significant digits) for the column. NULL if not a numeric field.

    NUMERIC_SCALE

    For numeric types, the scale (significant digits to the right of the decimal point). NULL if not a numeric field.

    DATETIME_PRECISION

    Fractional-seconds precision, or NULL if not a .

    CHARACTER_SET_NAME

    if a non-binary , otherwise NULL.

    COLLATION_NAME

    if a non-binary , otherwise NULL.

    DATA_TYPE

    The column's .

    ROUTINE_BODY

    Always SQL.

    ROUTINE_DEFINITION

    Definition of the routine.

    EXTERNAL_NAME

    Always NULL.

    EXTERNAL_LANGUAGE

    Always SQL.

    PARAMETER_STYLE

    Always SQL.

    IS_DETERMINISTIC

    Whether the routine is deterministic (can produce only one result for a given list of parameters) or not.

    SQL_DATA_ACCESS

    One of READS SQL DATA, MODIFIES SQL DATA, CONTAINS SQL, or NO SQL.

    SQL_PATH

    Always NULL.

    SECURITY_TYPE

    INVOKER or DEFINER. Indicates which user's privileges apply to this routine.

    CREATED

    Date and time the routine was created.

    LAST_ALTERED

    Date and time the routine was last changed.

    SQL_MODE

    The at the time the routine was created.

    ROUTINE_COMMENT

    Comment associated with the routine.

    DEFINER

    If the SECURITY_TYPE is DEFINER, this value indicates which user defined this routine.

    CHARACTER_SET_CLIENT

    The used by the client that created the routine.

    COLLATION_CONNECTION

    The (and character set) used by the connection that created the routine.

    DATABASE_COLLATION

    The default (and character set) for the database, at the time the routine was created.

    It provides information similar to, but more complete, than the SHOW PROCEDURE STATUS and SHOW FUNCTION STATUS statements.

    For information about the parameters accepted by the routine, you can query the information_schema.PARAMETERS table.

    • Stored Function Overview

    • Stored Procedure Overview

    This page is licensed: CC BY-SA / Gnu FDL

    SPECIFIC_NAME

    Information Schema
    stored procedures
    stored functions

    See also

    spinner

    TRIGGER_SCHEMA

    Database name in which the trigger occurs.

    TRIGGER_NAME

    Name of the trigger.

    EVENT_MANIPULATION

    The event that activates the trigger. Prior to MariaDB 12.0, one of INSERT, UPDATE or DELETE. From MariaDB 12.0, can contain multiple values, comma-separated.

    EVENT_OBJECT_CATALOG

    Always def.

    EVENT_OBJECT_SCHEMA

    Database name on which the trigger acts.

    EVENT_OBJECT_TABLE

    Table name on which the trigger acts.

    ACTION_ORDER

    Indicates the order that the action will be performed in (of the list of a table's triggers with identical EVENT_MANIPULATION and ACTION_TIMING values). See the clauses.

    ACTION_CONDITION

    NULL

    ACTION_STATEMENT

    Trigger body, UTF-8 encoded.

    ACTION_ORIENTATION

    Always ROW.

    ACTION_TIMING

    Whether the trigger acts BEFORE or AFTER the event that triggers it.

    ACTION_REFERENCE_OLD_TABLE

    Always NULL.

    ACTION_REFERENCE_NEW_TABLE

    Always NULL.

    ACTION_REFERENCE_OLD_ROW

    Always OLD.

    ACTION_REFERENCE_NEW_ROW

    Always NEW.

    CREATED

    Always NULL.

    SQL_MODE

    The when the trigger was created, and which it uses for execution.

    DEFINER

    The account that created the trigger, in the form user_name@host_name

    CHARACTER_SET_CLIENT

    The client when the trigger was created, from the session value of the system variable.

    COLLATION_CONNECTION

    The client when the trigger was created, from the session value of the system variable.

    DATABASE_COLLATION

    of the associated database.

    Queries to the TRIGGERS table return information even if the user doesn't have SELECT privileges on the columns. The columns ACTION_CONDITION, ACTION_STATEMENT and DEFINER are NULL unless the user has the TRIGGER privilege. Similar information is returned by the SHOW TRIGGERS statement.

    • Trigger Overview

    • CREATE TRIGGER

    • DROP TRIGGER

    • SHOW TRIGGERS

    This page is licensed: CC BY-SA / Gnu FDL

    TRIGGER_CATALOG

    Always def.

    Information Schema
    triggers

    See also

    spinner

    POOL_ID

    Buffer Pool identifier. From returns a value of 0, since multiple InnoDB buffer pool instances has been removed.

    LRU_POSITION

    LRU (Least recently-used), for determining eviction order from the buffer pool.

    SPACE

    Tablespace identifier. Matches the SPACE value on the table.

    PAGE_NUMBER

    Buffer pool page number.

    PAGE_TYPE

    Page type; one of allocated (newly-allocated page), index (B-tree node), undo_log (undo log page), inode (index node), ibuf_free_list (insert buffer free list), ibuf_bitmap (insert buffer bitmap), system (system page), trx_system (transaction system data), file_space_header (file space header), extent_descriptor (extent descriptor page), blob (uncompressed blob page), compressed_blob (first compressed blob page), compressed_blob2 (subsequent compressed blob page) or unknown.

    FLUSH_TYPE

    Flush type. 0= FLUSH_KEEP, 1 =FLUSH_RELEASE, 2 = FLUSH_IGNORE_CHANGED, 3= FLUSH_FORCE_WRITE

    FIX_COUNT

    Count of the threads using this block in the buffer pool. When it is zero, the block can be evicted from the buffer pool.

    IS_HASHED

    Whether or not a hash index has been built on this page.

    NEWEST_MODIFICATION

    Most recent modification's Log Sequence Number.

    OLDEST_MODIFICATION

    Oldest modification's Log Sequence Number.

    ACCESS_TIME

    Abstract number representing the time the page was first accessed.

    TABLE_NAME

    Table that the page belongs to.

    INDEX_NAME

    Index that the page belongs to, either a clustered index or a secondary index.

    NUMBER_RECORDS

    Number of records the page contains.

    DATA_SIZE

    Size in bytes of all the records contained in the page.

    COMPRESSED_SIZE

    Compressed size in bytes of the page, or NULL for pages that aren't compressed.

    PAGE_STATE

    Page state; one of FILE_PAGE (page from a file) or MEMORY (page from an in-memory object) for valid data, or one of NULL, READY_FOR_USE, NOT_USED, REMOVE_HASH.

    IO_FIX

    Whether there is I/O pending for the page; one of IO_NONE (no pending I/O), IO_READ (read pending), IO_WRITE (write pending).

    IS_OLD

    Whether the page is old or not.

    FREE_PAGE_CLOCK

    Freed_page_clock counter, which tracks the number of blocks removed from the end of the LRU list, at the time the block was last placed at the head of the list.

    The related INFORMATION_SCHEMA.INNODB_BUFFER_PAGE table contains the same information, but with a block id rather than LRU position.

    This page is licensed: CC BY-SA / Gnu FDL

    Information Schema
    buffer pool
    privilege
    DESC information_schema.innodb_buffer_page_lru;
    +---------------------+---------------------+------+-----+---------+-------+
    | Field               | Type                | Null | Key | Default | Extra |
    +---------------------+---------------------+------+-----+---------+-------+
    | POOL_ID             | bigint(21) unsigned | NO   |     | 0       |       |
    | LRU_POSITION        | bigint(21) unsigned | NO   |     | 0       |       |
    | SPACE               | bigint(21) unsigned | NO   |     | 0       |       |
    | PAGE_NUMBER         | bigint(21) unsigned | NO   |     | 0       |       |
    | PAGE_TYPE           | varchar(64)         | YES  |     | NULL    |       |
    | FLUSH_TYPE          | bigint(21) unsigned | NO   |     | 0       |       |
    | FIX_COUNT           | bigint(21) unsigned | NO   |     | 0       |       |
    | IS_HASHED           | varchar(3)          | YES  |     | NULL    |       |
    | NEWEST_MODIFICATION | bigint(21) unsigned | NO   |     | 0       |       |
    | OLDEST_MODIFICATION | bigint(21) unsigned | NO   |     | 0       |       |
    | ACCESS_TIME         | bigint(21) unsigned | NO   |     | 0       |       |
    | TABLE_NAME          | varchar(1024)       | YES  |     | NULL    |       |
    | INDEX_NAME          | varchar(1024)       | YES  |     | NULL    |       |
    | NUMBER_RECORDS      | bigint(21) unsigned | NO   |     | 0       |       |
    | DATA_SIZE           | bigint(21) unsigned | NO   |     | 0       |       |
    | COMPRESSED_SIZE     | bigint(21) unsigned | NO   |     | 0       |       |
    | COMPRESSED          | varchar(3)          | YES  |     | NULL    |       |
    | IO_FIX              | varchar(64)         | YES  |     | NULL    |       |
    | IS_OLD              | varchar(3)          | YES  |     | NULL    |       |
    | FREE_PAGE_CLOCK     | bigint(21) unsigned | NO   |     | 0       |       |
    +---------------------+---------------------+------+-----+---------+-------+
    SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE_LRU\G
    ...
    *************************** 6. row ***************************
                POOL_ID: 0
           LRU_POSITION: 5
                  SPACE: 0
            PAGE_NUMBER: 11
              PAGE_TYPE: INDEX
             FLUSH_TYPE: 1
              FIX_COUNT: 0
              IS_HASHED: NO
    NEWEST_MODIFICATION: 2046835
    OLDEST_MODIFICATION: 0
            ACCESS_TIME: 2585566280
             TABLE_NAME: `SYS_INDEXES`
             INDEX_NAME: CLUST_IND
         NUMBER_RECORDS: 57
              DATA_SIZE: 4016
        COMPRESSED_SIZE: 0
             COMPRESSED: NO
                 IO_FIX: IO_NONE
                 IS_OLD: NO
        FREE_PAGE_CLOCK: 0
    ...

    Example

    spinner

    WORD

    Word from the text of a newly added row. Words can appear multiple times in the table, once per DOC_ID and POSITION combination.

    FIRST_DOC_ID

    First document ID where this word appears in the index.

    LAST_DOC_ID

    Last document ID where this word appears in the index.

    DOC_COUNT

    Number of rows containing this word in the index.

    DOC_ID

    Document ID of the newly added row, either an appropriate ID column or an internal InnoDB value.

    Note that for OPTIMIZE TABLE to process InnoDB fulltext index data, the innodb_optimize_fulltext_only system variable needs to be set to 1. When this is done, and an OPTIMIZE TABLE statement run, the INNODB_FT_INDEX_CACHE table will be emptied, and the INNODB_FT_INDEX_TABLE table will be updated.

    The OPTIMIZE TABLE statement has no effect, because the innodb_optimize_fulltext_only variable wasn't set:

    This page is licensed: CC BY-SA / Gnu FDL

    Information Schema
    fulltext index
    OPTIMIZE TABLE
    privilege
    innodb_ft_aux_table
    SELECT * FROM INNODB_FT_INDEX_CACHE;
    +------------+--------------+-------------+-----------+--------+----------+
    | WORD       | FIRST_DOC_ID | LAST_DOC_ID | DOC_COUNT | DOC_ID | POSITION |
    +------------+--------------+-------------+-----------+--------+----------+
    | and        |            4 |           4 |         1 |      4 |        0 |
    | arrived    |            4 |           4 |         1 |      4 |       20 |
    | ate        |            1 |           1 |         1 |      1 |        4 |
    | everybody  |            1 |           1 |         1 |      1 |        8 |
    | goldilocks |            4 |           4 |         1 |      4 |        9 |
    | hungry     |            3 |           3 |         1 |      3 |        8 |
    | then       |            4 |           4 |         1 |      4 |        4 |
    | wicked     |            2 |           2 |         1 |      2 |        4 |
    | witch      |            2 |           2 |         1 |      2 |       11 |
    +------------+--------------+-------------+-----------+--------+----------+
    9 rows in set (0.00 sec)
    
    INSERT INTO test.ft_innodb VALUES(3,'And she ate a pear');
    
    SELECT * FROM INNODB_FT_INDEX_CACHE;
    +------------+--------------+-------------+-----------+--------+----------+
    | WORD       | FIRST_DOC_ID | LAST_DOC_ID | DOC_COUNT | DOC_ID | POSITION |
    +------------+--------------+-------------+-----------+--------+----------+
    | and        |            4 |           5 |         2 |      4 |        0 |
    | and        |            4 |           5 |         2 |      5 |        0 |
    | arrived    |            4 |           4 |         1 |      4 |       20 |
    | ate        |            1 |           5 |         2 |      1 |        4 |
    | ate        |            1 |           5 |         2 |      5 |        8 |
    | everybody  |            1 |           1 |         1 |      1 |        8 |
    | goldilocks |            4 |           4 |         1 |      4 |        9 |
    | hungry     |            3 |           3 |         1 |      3 |        8 |
    | pear       |            5 |           5 |         1 |      5 |       14 |
    | she        |            5 |           5 |         1 |      5 |        4 |
    | then       |            4 |           4 |         1 |      4 |        4 |
    | wicked     |            2 |           2 |         1 |      2 |        4 |
    | witch      |            2 |           2 |         1 |      2 |       11 |
    +------------+--------------+-------------+-----------+--------+----------+
    OPTIMIZE TABLE test.ft_innodb\G
    *************************** 1. row ***************************
       Table: test.ft_innodb
          Op: optimize
    Msg_type: note
    Msg_text: Table does not support optimize, doing recreate + analyze instead
    *************************** 2. row ***************************
       Table: test.ft_innodb
          Op: optimize
    Msg_type: status
    Msg_text: OK
    2 rows in set (2.24 sec)
    
    SELECT * FROM INNODB_FT_INDEX_CACHE;
    +------------+--------------+-------------+-----------+--------+----------+
    | WORD       | FIRST_DOC_ID | LAST_DOC_ID | DOC_COUNT | DOC_ID | POSITION |
    +------------+--------------+-------------+-----------+--------+----------+
    | and        |            4 |           5 |         2 |      4 |        0 |
    | and        |            4 |           5 |         2 |      5 |        0 |
    | arrived    |            4 |           4 |         1 |      4 |       20 |
    | ate        |            1 |           5 |         2 |      1 |        4 |
    | ate        |            1 |           5 |         2 |      5 |        8 |
    | everybody  |            1 |           1 |         1 |      1 |        8 |
    | goldilocks |            4 |           4 |         1 |      4 |        9 |
    | hungry     |            3 |           3 |         1 |      3 |        8 |
    | pear       |            5 |           5 |         1 |      5 |       14 |
    | she        |            5 |           5 |         1 |      5 |        4 |
    | then       |            4 |           4 |         1 |      4 |        4 |
    | wicked     |            2 |           2 |         1 |      2 |        4 |
    | witch      |            2 |           2 |         1 |      2 |       11 |
    +------------+--------------+-------------+-----------+--------+----------+
    13 rows in set (0.00 sec)
    SHOW VARIABLES LIKE 'innodb_optimize_fulltext_only';
    +-------------------------------+-------+
    | Variable_name                 | Value |
    +-------------------------------+-------+
    | innodb_optimize_fulltext_only | OFF   |
    +-------------------------------+-------+
    
    SET GLOBAL innodb_optimize_fulltext_only =1;
    
    OPTIMIZE TABLE test.ft_innodb;
    +----------------+----------+----------+----------+
    | Table          | Op       | Msg_type | Msg_text |
    +----------------+----------+----------+----------+
    | test.ft_innodb | optimize | status   | OK       |
    +----------------+----------+----------+----------+
    
    SELECT * FROM INNODB_FT_INDEX_CACHE;
    Empty set (0.00 sec)

    Examples

    spinner

    CHARACTER_SET_NAME

    Associated character set.

    ID

    Collation id.

    IS_DEFAULT

    Whether the collation is the character set's default.

    IS_COMPILED

    Whether the collation is compiled into the server.

    SORTLEN

    Sort length, used for determining the memory used to sort strings in this collation.

    PAD_ATTRIBUTE

    Determines whether or not trailing spaces are regarded as normal characters. See below. Available from MariaDB 12.1.

    COMMENT

    For utf8mb4_0900 collations, contains the corresponding alias collation.

    From , , .

    SELECT 'a ' = 'a'; 
    +------------+ 
    | 'a ' = 'a' | 
    +------------+
    |          0 | 
    +------------+
    SELECT 'a ' = 'a'; 
    +------------+ 
    | 'a ' = 'a' | 
    +------------+
    |          1 | 
    +------------+
    SELECT * FROM information_schema.COLLATIONS;
    +------------------------------+--------------------+------+------------+-------------+---------+
    | COLLATION_NAME               | CHARACTER_SET_NAME | ID   | IS_DEFAULT | IS_COMPILED | SORTLEN |
    +------------------------------+--------------------+------+------------+-------------+---------+
    | big5_chinese_ci              | big5               |    1 | Yes        | Yes         |       1 |
    | big5_bin                     | big5               |   84 |            | Yes         |       1 |
    | big5_chinese_nopad_ci        | big5               | 1025 |            | Yes         |       1 |
    | big5_nopad_bin               | big5               | 1108 |            | Yes         |       1 |
    | dec8_swedish_ci              | dec8               |    3 | Yes        | Yes         |       1 |
    | dec8_bin                     | dec8               |   69 |            | Yes         |       1 |
    | dec8_swedish_nopad_ci        | dec8               | 1027 |            | Yes         |       1 |
    | dec8_nopad_bin               | dec8               | 1093 |            | Yes         |       1 |
    | cp850_general_ci             | cp850              |    4 | Yes        | Yes         |       1 |
    | cp850_bin                    | cp850              |   80 |            | Yes         |       1 |
    ...

    NO PAD Collations

    PAD SPACE Collations

    Example

    See Also

    SHOW COLLATION
    Setting Character Sets and Collations
    Supported Character Sets and Collations
    spinner
    SHOW COLLATION WHERE Charset LIKE 'utf8mb3';
    SELECT * FROM information_schema.COLLATIONS 
    WHERE CHARACTER_SET_NAME LIKE 'utf8mb3';