Closed
Description
1. What did you do?
I exported mysql DDL-s by using mysqldump
with parameter --no-data
, so I got DDL-s like below:
CREATE TABLE `t_bs_s_data_item` (
`ITEM_CD` varchar(10) NOT NULL COMMENT '数据项代码 ',
`ITEM_NM` varchar(50) NOT NULL COMMENT '数据项名称',
`ITEM_TYPE` varchar(20) NOT NULL COMMENT '数据项值类型',
`TS` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '时间戳',
`NT` varchar(256) DEFAULT NULL COMMENT '备注'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='数据项表';
I got success msgs after executed all the DDL-s in TiDB, but all the table/column comments seem missing.
2. What did you expect to see?
MySQL > SHOW FULL COLUMNS FROM t_bs_s_data_item;
+-----------+--------------+-----------------+------+-----+-------------------+-----------------------------+---------------------------------+--------------------+
| Field | Type | Collation | Null | Key | Default | Extra | Privileges | Comment |
+-----------+--------------+-----------------+------+-----+-------------------+-----------------------------+---------------------------------+--------------------+
| ITEM_CD | varchar(10) | utf8_general_ci | NO | | NULL | | select,insert,update,references | 数据项代码 |
| ITEM_NM | varchar(50) | utf8_general_ci | NO | | NULL | | select,insert,update,references | 数据项名称 |
| ITEM_TYPE | varchar(20) | utf8_general_ci | NO | | NULL | | select,insert,update,references | 数据项值类型 |
| TS | timestamp | NULL | YES | | CURRENT_TIMESTAMP | on update CURRENT_TIMESTAMP | select,insert,update,references | 时间戳 |
| NT | varchar(256) | utf8_general_ci | YES | | NULL | | select,insert,update,references | 备注 |
+-----------+--------------+-----------------+------+-----+-------------------+-----------------------------+---------------------------------+--------------------+
5 rows in set (0.00 sec)
3. What did you see instead?
comments are missing:
TiDB > SHOW FULL COLUMNS FROM t_bs_s_data_item;
+-----------+--------------+-----------+------+------+-------------------+-----------------------------+---------------------------------+---------+
| Field | Type | Collation | Null | Key | Default | Extra | Privileges | Comment |
+-----------+--------------+-----------+------+------+-------------------+-----------------------------+---------------------------------+---------+
| ITEM_CD | varchar(10) | utf8_bin | NO | | NULL | | select,insert,update,references | |
| ITEM_NM | varchar(50) | utf8_bin | NO | | NULL | | select,insert,update,references | |
| ITEM_TYPE | varchar(20) | utf8_bin | NO | | NULL | | select,insert,update,references | |
| TS | timestamp | binary | YES | | CURRENT_TIMESTAMP | on update CURRENT_TIMESTAMP | select,insert,update,references | |
| NT | varchar(256) | utf8_bin | YES | | NULL | | select,insert,update,references | |
+-----------+--------------+-----------+------+------+-------------------+-----------------------------+---------------------------------+---------+
5 rows in set (0.00 sec)
4. What version of TiDB are you using (tidb-server -V
)?
[tidb@TiDB_PD bin]$ ./tidb-server -V
Git Commit Hash: 365e4ab491b683a69c2004f30b1ae4f86256e2ad
Git Commit Branch: master
UTC Build Time: 2017-08-16 01:24:27
Activity