go-mysql-server
go-mysql-server copied to clipboard
Describe for default value expressions is formatted incorrectly
Consider the following example
CREATE TABLE t(pk int primary key, val int DEFAULT (pk * 2))
Mysql with describe t will print
mysql> desc t;
+-------+------+------+-----+------------+-------------------+
| Field | Type | Null | Key | Default | Extra |
+-------+------+------+-----+------------+-------------------+
| pk | int | NO | PRI | NULL | |
| val | int | YES | | (`pk` * 2) | DEFAULT_GENERATED |
+-------+------+------+-----+------------+-------------------+
2 rows in set (0.02 sec)
GMS will instead return ((pk * 2)) for val