tidb: Executing the statement of `select ... col like 'String'` gets the wrong result when col is unique key.
Description
1.What did you do?
create table t (c varchar(30), unique key(c));
insert into t values("a");
SELECT * FROM t WHERE c LIKE 'A';
2.What did you expect to see? ±-----+ | c | ±-----+ | a | ±-----+
3.What did you see instead? Empty set (0.00 sec)
SIG slack channel
Score
- 300
Mentor
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 21 (19 by maintainers)
Commits related to this issue
- tests/br/compatibility: fix failed for manifest unknown (#1161) — committed to 3pointer/tidb by Leavrth 3 years ago
- [parser] parser: support builtin function SOUNDEX (#1161) * add soundex * add unit test — committed to xhebox/tidb by clark1013 3 years ago
- [parser] parser: support builtin function SOUNDEX (#1161) * add soundex * add unit test — committed to xhebox/tidb by clark1013 3 years ago
- [parser] parser: support builtin function SOUNDEX (#1161) * add soundex * add unit test — committed to xhebox/tidb by clark1013 3 years ago
- [parser] parser: support builtin function SOUNDEX (#1161) * add soundex * add unit test — committed to pingcap/tidb by clark1013 3 years ago
After a more careful investigation, this bug is already fixed.
As the document states, https://docs.pingcap.com/tidb/stable/character-set-and-collation#new-framework-for-collations, we need to enable
on the first time of bootstrap, and then the collation will work as MySQL.
@lzmhhh123 Please help close this issue.