). It has instrumentation in SHOW and I_S. Please admit that this is a bug and an oversight from MariaDB to forget about this!
Field Type Null Key
select version(); -- 5.7.5-labs-preview
create table comments(
userid int AS (ExtractValue(comment,'/comment/userid')) STORED,
comment TEXT,
KEY(userid));
show columns from comments;
/*Default Extra
------- ------- ------ ------ ------- ---------
userid int(11) YES MUL (NULL) VIRTUAL
comment text YES (NULL)
*/
describe comments;
/*
Field Type Null Key Default Extra
------- ------- ------ ------ ------- ---------
userid int(11) YES MUL (NULL) VIRTUAL
comment text YES (NULL)
*/
show full fields from comments;
/*
Field Type Collation Null Key Default Extra Privileges Comment
------- ------- ----------------- ------ ------ ------- ------- ------------------------------- ---------
userid int(11) (NULL) YES MUL (NULL) VIRTUAL select,insert,update,references
comment text latin1_swedish_ci YES (NULL) select,insert,update,references
*/
select * from information_schema.`COLUMNS` where TABLE_NAME = 'comments';
/*
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT GENERATION_EXPRESSION
------------- ------------ ---------- ----------- ---------------- -------------- ----------- --------- ------------------------ ---------------------- ----------------- ------------- ------------------ ------------------ ----------------- ----------- ---------- ------- ------------------------------- -------------- -----------------------------------------
def test comments userid 1 (NULL) YES int (NULL) (NULL) 10 0 (NULL) (NULL) (NULL) int(11) MUL VIRTUAL select,insert,update,references ExtractValue(comment,'/comment/userid')
def test comments comment 2 (NULL) YES text 65535 65535 (NULL) (NULL) (NULL) latin1 latin1_swedish_ci text select,insert,update,references
*/