Bug #103171 Index of character utf8 is wrong
| Submitted: | 1 Apr 2021 10:10 | Modified: | 1 Apr 2021 11:47 |
|---|---|---|---|
| Reporter: | Guo Wenxuan | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: DML | Severity: | S2 (Serious) |
| Version: | 8.0./5.7 | OS: | Any |
| Assigned to: | CPU Architecture: | Any |
[1 Apr 2021 11:47]
MySQL Verification Team
Thank you for the bug report.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 3.770 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.
Description: correct: mysql> select * from t1 where col1 like "amysql%"; +--------+------+ | col1 | col2 | +--------+------+ | amysql | b | +--------+------+ 1 row in set (0.04 sec) incorrect: mysql> select * from t1 where col1 like "amysql%"; Empty set How to repeat: create table t1(col1 varchar(255) COLLATE utf8_bin DEFAULT NULL, col2 varchar(255) COLLATE utf8_bin DEFAULT NULL, KEY `Idx_col1` (col1))ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; insert into t1 values("a","b"); update t1 set col1 = "amysql\r\n" where col2 = "b";