【 TiDB 使用环境】测试
具体操作:
mysql> insert into a select ‘x’;
Query OK, 1 row affected (0.00 sec)
Records: 1 Duplicates: 0 Warnings: 0
mysql> insert into a select 'x ';
Query OK, 1 row affected (0.00 sec)
Records: 1 Duplicates: 0 Warnings: 0
mysql> create unique index uk_name on a(name);
ERROR 1062 (23000): Duplicate entry ‘x’ for key ‘a.uk_name’
mysql> select length(name) from a;
±-------------+
| length(name) |
±-------------+
| 1 |
| 3 |
±-------------+
2 rows in set (0.00 sec)
tidb字段内容尾部空格如何识别
