Bug #111272 Inconsistent behaviors on string comparison with/without index
| Submitted: | 5 Jun 2023 8:47 | Modified: | 5 Jun 2023 8:50 |
|---|---|---|---|
| Reporter: | John Jove | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: Optimizer | Severity: | S2 (Serious) |
| Version: | 8.0.32, 8.0.33 | OS: | Any |
| Assigned to: | CPU Architecture: | Any |
[5 Jun 2023 8:50]
MySQL Verification Team
Hello John, Thank you for the report and test case. Verified as described. regards, Umesh
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.039 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: In the following case 1, the SELECT only returns 1 row. When I remove the index from case 1, re-execute the SELECT, two rows are returned as shown in case 2. How to repeat: -- case 1 DROP TABLE IF EXISTS t1; CREATE TABLE t1 (c1 TINYTEXT, KEY i0 (c1(1))); INSERT INTO t1 VALUES ("͕fB-'"),("^1o"); SELECT c1 FROM t1 WHERE c1 > ("?ykFo|1"); -- 1 -- case 2 DROP TABLE IF EXISTS t1; CREATE TABLE t1 (c1 TINYTEXT); INSERT INTO t1 VALUES ("͕fB-'"),("^1o"); SELECT c1 FROM t1 WHERE c1 > ("?ykFo|1"); -- 2