← Back to team overview

maria-developers team mailing list archive

[Maria-discuss] Reqeust for SHOW FULL FIELDS FROM and virtual tables in MariaDB

 

Hi!

>>>>> "Peter" == Peter Laursen <peter_laursen@xxxxxxxxxx> writes:

Peter> Refer http://kb.askmonty.org/v/virtual-columns - the example
Peter> CREATE TABLE table1 (
Peter> a INT NOT NULL,
Peter> b VARCHAR(32),
Peter> c INT AS (a MOD 10) virtual,
Peter> d VARCHAR(5) AS (LEFT(b,5)) persistent);


Peter> now

Peter> SHOW FULL FIELDS FROM table1;

Peter> Field Type Collation Null Key Default Extra Privileges Comment
Peter> ------ ----------- ----------------- ------ ------ ------- -------
Peter> ------------------------------- -------
Peter> a int(11) (NULL) NO (NULL) select,insert,update,references
Peter> b varchar(32) latin1_swedish_ci YES (NULL) select,insert,update,references
Peter> c int(11) (NULL) YES (NULL) VIRTUAL select,insert,update,references
Peter> d varchar(5) latin1_swedish_ci YES (NULL) VIRTUAL
Peter> select,insert,update,references

Peter> I request that 'extra' column should return either "PERSISTENT" or "
Peter> VIRTUAL, PERSISTENT" for column `d`.  The reason is that the output from
Peter> SHOW FULL FIELDS returns an *array* (that will not need to be parsed)  as
Peter> opposite to SHOW CREATE TABLE. Accordingly SHOW FULL FIELDS is much easier
Peter> to use for an 'unintelligent client' as opposed to an 'intelligent (or
Peter> ignorant for that sake :-) ) human user to decide on special properties for
Peter> a column.

Agree; I will fix this for 5.3

Regards,
Monty


References