Description:
The documentation for the extra column in information_schema.columns is not documented correctly.
For generated columns it documents it having a value of "VIRTUAL GENERATED or VIRTUAL STORED for generated columns."
but the actual value is "STORED GENERATED" or "VIRTUAL GENERATED"
How to repeat:
CREATE TABLE `test_table` (
`id` bigint NOT NULL AUTO_INCREMENT,
`core_unit_id` int DEFAULT NULL,
`core_unit_id_not_null_stored` int GENERATED ALWAYS AS (coalesce(`core_unit_id`,0)) STORED NOT NULL,
`core_unit_id_not_null_virtual` int GENERATED ALWAYS AS (coalesce(`core_unit_id`,0)) VIRTUAL NOT NULL,
PRIMARY KEY (`id`)
);
mysql> SELECT column_name, extra FROM information_schema.columns WHERE table_name='test_table';
+-------------------------------+-------------------+
| COLUMN_NAME | EXTRA |
+-------------------------------+-------------------+
| id | auto_increment |
| core_unit_id | |
| core_unit_id_not_null_stored | STORED GENERATED |
| core_unit_id_not_null_virtual | VIRTUAL GENERATED |
+-------------------------------+-------------------+
4 rows in set (0.00 sec)