Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
create table zz (x varchar(40) CHARACTER SET ascii COLLATE ascii_bin, UNIQUE KEY `uk`(`x`(4)));
insert into zz select 'abc ';
insert into zz select 'abc d';
2. What did you expect to see? (Required)
insert into zz select 'abc d';
mysql> insert into zz select 'abc d';
ERROR 1062 (23000): Duplicate entry 'abc ' for key 'uk'
3. What did you see instead (Required)
mysql> insert into zz select 'abc d';
Query OK, 1 row affected (0.01 sec)
Records: 1 Duplicates: 0 Warnings: 0
4. What is your TiDB version? (Required)
5.0.0, 5.0.1
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
5.0.0, 5.0.1