Open yahonda opened 3 weeks ago
When the table default collation and the column level collation does not match, TiDB shows the column level collation as follows.
mysql> create table foo2 (bar varchar(250) COLLATE utf8mb4_0900_bin) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
Query OK, 0 rows affected (0.06 sec)
mysql> show create table foo2\G
*************************** 1. row ***************************
Table: foo2
Create Table: CREATE TABLE `foo2` (
`bar` varchar(250) COLLATE utf8mb4_0900_bin DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin
1 row in set (0.00 sec)
mysql> select version();
+--------------------+
| version() |
+--------------------+
| 8.0.11-TiDB-v8.1.0 |
+--------------------+
1 row in set (0.00 sec)
Hi @yahonda , thanks for reporting this.
Though we have different CREATE TABLE
statement, however, it doesn't seems to lead a trouble to usage of TiDB. So I don't think we need to fix it.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
show create table should show the column level COLLATE as MySQL
3. What did you see instead (Required)
The column level collation does not appear at TiDB.
4. What is your TiDB version? (Required)