Bug #104453 Mistake regarding possible values of EXTRA field in information_schema
Submitted: 29 Jul 2021 8:50 Modified: 31 Jul 2021 16:04
Reporter: Gabor Bencsik Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:8.0, 5.7 OS:Any
Assigned to: CPU Architecture:Any

[29 Jul 2021 8:50] Gabor Bencsik
Description:
https://dev.mysql.com/doc/refman/8.0/en/show-columns.html

Near the end of this page, is a line:
VIRTUAL GENERATED or VIRTUAL STORED for generated columns.

I believe this line should be:
VIRTUAL GENERATED or STORED GENERATED for generated columns.

How to repeat:
Link to the page:
https://dev.mysql.com/doc/refman/8.0/en/show-columns.html
[29 Jul 2021 9:18] MySQL Verification Team
Hello Gabor Bencsik,

Thank you for the report.

regards,
Umesh
[29 Jul 2021 9:19] MySQL Verification Team
-
 bin/mysql -uroot -S /tmp/mysql_ushastry.sock                                                                                                                         Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 7
Server version: 8.0.26 MySQL Community Server - GPL

Copyright (c) 2000, 2021, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> create database test;
Query OK, 1 row affected (0.00 sec)

mysql> use test
Database changed
mysql> CREATE TABLE `t` (
    -> `a` varchar(100) DEFAULT NULL,
    -> `b` varchar(100) DEFAULT NULL
    -> ) ENGINE=InnoDB;
Query OK, 0 rows affected (0.02 sec)

mysql>
mysql> insert into t values ("this is an experiment", "with string manipulation");
Query OK, 1 row affected (0.01 sec)

mysql> ALTER TABLE t ADD COLUMN count1 int GENERATED ALWAYS AS (char_length(a)) VIRTUAL;
Query OK, 0 rows affected (0.01 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql> ALTER TABLE t ADD COLUMN count2 int GENERATED ALWAYS AS (char_length(b)) STORED;
Query OK, 1 row affected (0.04 sec)
Records: 1  Duplicates: 0  Warnings: 0

mysql> show columns from t;
+--------+--------------+------+-----+---------+-------------------+
| Field  | Type         | Null | Key | Default | Extra             |
+--------+--------------+------+-----+---------+-------------------+
| a      | varchar(100) | YES  |     | NULL    |                   |
| b      | varchar(100) | YES  |     | NULL    |                   |
| count1 | int          | YES  |     | NULL    | VIRTUAL GENERATED |
| count2 | int          | YES  |     | NULL    | STORED GENERATED  |
+--------+--------------+------+-----+---------+-------------------+
4 rows in set (0.00 sec)
[31 Jul 2021 16:04] Daniel Price
Posted by developer:
 
The referenced documentation has been updated. The change should appear online soon.
Thank you for the bug report.