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...
The Information Schema PARAMETERS table stores information about parameters for stored procedures and functions, including data types and modes.
The Information Schema INNODB_METRICS table contains a wide range of low-level performance metrics and counters for the InnoDB storage engine.
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.
SET GLOBAL innodb_monitor_enable = icp_match;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 matchesSELECT * 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: NULLThe 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.
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.
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 |
+----+------+----------+---------+-----------+The Information Schema APPLICABLE_ROLES table shows the role authorizations that the current user may use, detailing grantable and default status.
The Information Schema ALL_PLUGINS table contains information about server plugins, whether installed or not, providing a superset of SHOW PLUGINS SONAME.
These system tables provide detailed metadata about InnoDB tables, including their structure, storage, and other crucial properties for analysis.
The Information Schema FILES table provides information about files stored in tablespaces, such as those used by the InnoDB storage engine.
FLUSH FILE_KEY_MANAGEMENT_KEYSSELECT * 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 |
+----------------+-------------+--------------+------------+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: StableThe Information Schema SLAVE_STATUS table displays status information for the replication slave threads, similar to SHOW SLAVE STATUS.
The Information Schema THREAD_POOL_WAITS table lists the number of times threads in the thread pool have waited for various events.
The Information Schema WSREP_CERT_KEYS_HISTORY table logs a history of certification keys for recently processed Galera transactions.
The Information Schema WSREP_CONNECTIONS table shows active connections to the Galera Cluster, primarily used for debugging cluster membership.
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)The Information Schema WSREP_THD_STATE_HISTORY table maintains a history of thread states for Galera replication, aiding in post-incident analysis.
The Information Schema CHARACTER_SETS table contains a list of supported character sets, their default collations, and maximum lengths.
The Information Schema ENABLED_ROLES table lists all roles that are currently enabled for the current session, including nested roles.
The Information Schema HASHICORP_KEY_MANAGEMENT_CACHE table provides information about keys managed by the HashiCorp Key Management plugin.
The GLOBAL_STATUS and SESSION_STATUS tables store the global and session values of server status variables, respectively.
The GLOBAL_VARIABLES and SESSION_VARIABLES tables store the global and session values of all system variables, respectively.
The Information Schema KEY_PERIOD_USAGE table describes how keys reference application-time periods, detailing constraints involving those periods.
The Information Schema OPTIMIZER_TRACE table contains details about the optimizer's decision-making process for the last executed query.
The Information Schema PERIODS table provides information about Application-Time Periods, detailing the start and end columns for system versioning.
The Information Schema QUERY_RESPONSE_TIME table displays the distribution of query execution times, helping to identify performance bottlenecks.
The Information Schema REFERENTIAL_CONSTRAINTS table contains metadata about foreign keys, including update and delete rules.
The Information Schema SPIDER_ALLOC_MEM table tracks memory allocation for the Spider storage engine, aiding in resource monitoring.
The Information Schema TABLE_CONSTRAINTS table describes constraints on tables, such as PRIMARY KEY, UNIQUE, and FOREIGN KEY constraints.
The Information Schema TABLE_PRIVILEGES table lists privileges granted specifically at the table level.
The Information Schema THREAD_POOL_GROUPS table provides details about the thread groups in the thread pool, including active thread counts.
The Information Schema THREAD_POOL_QUEUES table shows the status of the queues within the thread pool, detailing pending connections.
The Information Schema THREAD_POOL_STATS table provides performance statistics for the thread pool, such as thread creation and efficiency.
The Information Schema USER_PRIVILEGES table lists global privileges granted to user accounts, derived from the mysql.user table.
The Information Schema USERS table lists user accounts, including whether they are global or local, and details about their password expiration.
The Information Schema WSREP_STATUS table provides a comprehensive view of the Galera Cluster status variables, similar to SHOW STATUS LIKE 'wsrep%'
The Information Schema WSREP_THD_STATE table displays the internal state of Galera threads, helping to monitor replication progress and locking.
The Information Schema INNODB_CHANGED_PAGES table lists pages that have been modified since a specific checkpoint.
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_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_SYS_DATAFILES table, now deprecated and removed, was intended to provide metadata for InnoDB tablespace paths.
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: 3The Information Schema WSREP_MEMBERSHIP table lists the current members of the Galera Cluster, including their node UUIDs, names, and IP addresses.
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 |
+-------+--------------------------------------+-------+-----------------+NULL value.FLUSH HASHICORP_KEY_MANAGEMENT_CACHESHOW 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: 600CREATE 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 NULLSELECT * 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 |
+--------+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=0SELECT * 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 |
+-------+--------------------------------+The Information Schema CATALOG table stores information about catalogs on the server, including default character sets and collations.
The Information Schema COLLATION_CHARACTER_SET_APPLICABILITY table maps which character sets are associated with which collations.
The Information Schema FEEDBACK table is created when the Feedback Plugin is enabled and contains the usage data collected for submission.
The Information Schema INDEX_STATISTICS table provides statistics on index usage, helping to identify unused indexes and optimize performance.
The Information Schema KEY_CACHES table displays statistics about the segmented key cache, including block usage and read/write requests.
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 TRIGGERED_UPDATE_COLUMNS table identifies which columns are modified by the SET clause of a specific trigger.
The Information Schema WSREP_CERT_KEYS table displays the certification keys for transactions currently being processed by the Galera Cluster.
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)These tables provide status information on compression operations for XtraDB/InnoDB tables, grouped by individual indexes.
The INNODB_BUFFER_POOL_PAGES_INDEX table provides information about index pages in the buffer pool, specific to the XtraDB engine.
These tables provide status statistics on compressed pages within the buffer pool, useful for analyzing compression efficiency.
The Information Schema INNODB_FT_CONFIG table displays metadata about the configuration of an InnoDB FULLTEXT index, such as the internal cache size.
The INNODB_FT_DEFAULT_STOPWORD table lists the default stop words used by InnoDB FULLTEXT indexes when no custom stopword list is defined.
The INNODB_BUFFER_POOL_PAGES_BLOB table contains information about blob pages in the buffer pool, only available for XtraDB.
The Information Schema INNODB_LOCK_WAITS table maps blocked transactions to the transactions that are blocking them, aiding in deadlock analysis.
The INNODB_SYS_FIELDS table lists the fields that comprise InnoDB indexes, detailing their position within the index structure.
The Information Schema INNODB_MUTEXES table displays statistics about InnoDB mutex and read-write lock waits, helping to identify internal contention.
The Information Schema PROFILING table provides statement resource usage details, such as CPU time and block operations, when profiling is enabled.
The Information Schema SCHEMATA table stores information about databases on the server, including default character sets and collations.
The Information Schema TABLE_STATISTICS table provides usage statistics for tables, such as the number of rows read or changed.
The Information Schema WSREP_BF_ABORTS table provides statistics on Galera Cluster brute force aborts, detailing the victim and transaction IDs.
The INNODB_FT_INDEX_TABLE table provides information about the inverted index (tokens and positions) for an InnoDB FULLTEXT index currently in use.
The Information Schema COLUMN_PRIVILEGES table contains column privilege information derived from the mysql.columns_priv grant 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_SYS_FOREIGN_COLS table maps columns to their respective foreign key constraints within the InnoDB storage engine.
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/postSELECT * 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: 4044SELECT * 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: 358SELECT * 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: NULLSELECT * 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: bSET @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: wwwSELECT * 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 +----------------------------+---------------+------------------+-----------------+--------------+---------------------+--------------------+------------------+----------------------------+-----------+--------------+-------------+----------+-----------------+----------------+--------------+----------------------------+----------+---------+------------+------------------+
...SELECT * FROM INFORMATION_SCHEMA.SCHEMATA\G
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA\G
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 |
+--------------+------------+-----------+--------------+------------------------+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 |
+------------+--------------+-------------+-----------+--------+----------+SELECT * FROM information_schema.COLUMN_PRIVILEGES;
Empty SETSELECT * 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: 0SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS\G
*************************** 1. row ***************************
ID: fk_book_author
FOR_COL_NAME: author_id
REF_COL_NAME: id
POS: 0SELECT * FROM information_schema.INDEX_STATISTICS
WHERE TABLE_NAME = "author";
+--------------+------------+------------+-----------+
| TABLE_SCHEMA | TABLE_NAME | INDEX_NAME | ROWS_READ |
+--------------+------------+------------+-----------+
| books | author | by_name | 15 |
+--------------+------------+------------+-----------+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: 0The Information Schema COLLATIONS table contains a list of supported collations, indicating their associated character sets and compilation status.
The Information Schema ENGINES table displays status information about the server's storage engines, including support level and transaction capabilities.
The Information Schema EVENTS table stores information about scheduled events on the server, including their timing, definition, and status.
The Information Schema SEQUENCES table provides metadata about sequence objects, including their minimum, maximum, and current values.
The Information Schema STATISTICS table provides information about table indexes, serving as a standard-compliant alternative to SHOW INDEX.
The Information Schema SYSTEM_VARIABLES table contains all system variables and their current global or session values.
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 INNODB_SYS_COLUMNS table contains metadata about InnoDB table columns, derived directly from the internal InnoDB data dictionary.
The INNODB_SYS_FOREIGN table provides metadata about foreign key constraints defined on InnoDB tables, including reference details.
The Information Schema CHECK_CONSTRAINTS table stores metadata about the constraints defined for tables in all databases, including the check clause.
The Information Schema GEOMETRY_COLUMNS table describes the geometry columns in tables, providing details on spatial reference systems and geometry types.
The Information Schema ROUTINES table stores information about stored procedures and stored functions, including their definitions and properties.
The Information Schema TRIGGERS table contains detailed information about triggers, including the event, timing, and action statement.
The Information Schema INNODB_BUFFER_PAGE_LRU table details pages in the buffer pool and their position in the LRU eviction list.
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 Information Schema TABLESPACES table provides information about active tablespaces, specifically for the InnoDB storage engine.
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 SETSELECT 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: NOSELECT 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: 0CREATE 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: 0SELECT * 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)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: 1CREATE 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` > 10ALTER 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` < 100CREATE 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)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: 101DESC 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
...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)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 |
...SHOW COLLATION WHERE Charset LIKE 'utf8mb3';SELECT * FROM information_schema.COLLATIONS
WHERE CHARACTER_SET_NAME LIKE 'utf8mb3';