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:

ColumnDescription
TABLE_IDTable identifier, matching the value from INNODB_SYS_TABLES.TABLE_ID.
NAMEColumn name.
POSOrdinal position of the column in the table, starting from 0. This value is adjusted when columns are added or removed.
MTYPENumeric column type identifier, (see the table below for an explanation of its values).
PRTYPEBinary value of the InnoDB precise type, representing the data type, character set code and nullability.
LENColumn 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 IdentifierDescription
1VARCHAR
2CHAR
3FIXBINARY
4BINARY
5BLOB
6INT
7SYS_CHILD
8SYS
9FLOAT
10DOUBLE
11DECIMAL
12VARMYSQL
13MYSQL

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)

Comments

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