Information Schema INNODB_SYS_COLUMNS Table

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

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

Column Type Identifier Description
1 VARCHAR
2 CHAR
3 FIXBINARY
4 BINARY
5 BLOB
6 INT
7 SYS_CHILD
8 SYS
9 FLOAT
10 DOUBLE
11 DECIMAL
12 VARMYSQL
13 MYSQL

Example

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)
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.

© 2021 MariaDB
Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License.
https://mariadb.com/kb/en/information-schema-innodb_sys_columns-table/