Rechercher dans le manuel MySQL
25.39.30 The INFORMATION_SCHEMA INNODB_VIRTUAL Table
The INNODB_VIRTUAL
table provides
metadata about InnoDB
virtual generated
columns and columns upon which virtual generated columns
are based.
A row appears in the INNODB_VIRTUAL
table for each column upon which a virtual generated column is
based.
The INNODB_VIRTUAL
table has these
columns:
TABLE_ID
An identifier representing the table associated with the virtual column; the same value as
INNODB_TABLES.TABLE_ID
.POS
The position value of the virtual generated column. The value is large because it encodes the column sequence number and ordinal position. The formula used to calculate the value uses a bitwise operation:
((nth virtual generated column for the InnoDB instance + 1) << 16) + the ordinal position of the virtual generated column
For example, if the first virtual generated column in the
InnoDB
instance is the third column of the table, the formula is(0 + 1) << 16) + 2
. The first virtual generated column in theInnoDB
instance is always number 0. As the third column in the table, the ordinal position of the virtual generated column is 2. Ordinal positions are counted from 0.BASE_POS
The ordinal position of the columns upon which a virtual generated column is based.
Example
- +----------+-------+----------+
- | TABLE_ID | POS | BASE_POS |
- +----------+-------+----------+
- | 98 | 65538 | 0 |
- | 98 | 65538 | 1 |
- +----------+-------+----------+
Notes
If a constant value is assigned to a virtual generated column, as in the following table, an entry for the column does not appear in the
INNODB_VIRTUAL
table. For an entry to appear, a virtual generated column must have a base column.However, metadata for such a column does appear in the
INNODB_COLUMNS
table.You must have the
PROCESS
privilege to query this table.Use the
INFORMATION_SCHEMA
COLUMNS
table or theSHOW COLUMNS
statement to view additional information about the columns of this table, including data types and default values.
Traduction non disponible
Le manuel MySQL n'est pas encore traduit en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.
Document créé le 26/06/2006, dernière modification le 26/10/2018
Source du document imprimé : https://www.gaudry.be/mysql-rf-innodb-virtual-table.html
L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.
Références
Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.