Bug #99979 Error comparing numerical values vs strings.
| Submitted: | 25 Jun 2020 8:51 | Modified: | 25 Jun 2020 10:11 |
|---|---|---|---|
| Reporter: | RAFAEL J TORRES | Email Updates: | |
| Status: | Not a Bug | Impact on me: | |
| Category: | MySQL Server | Severity: | S1 (Critical) |
| Version: | * | OS: | Any |
| Assigned to: | CPU Architecture: | Any (x64) |
[25 Jun 2020 10:11]
MySQL Verification Team
Hello RAFAEL, Thank you for the report. Imho this is an expected and documented behavior - https://dev.mysql.com/doc/refman/8.0/en/type-conversion.html Also, see Bug #67427 regards, Umesh
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.052 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: Can any of you try this query. It seems silly, but I invite you to run it and comment on the result obtained. create table if not exists Test (id integer, title varchar (100)); replace into Test values (1, "ONE"), (2, "TWO"), (30, "Hello"), (40, "Hello"), (50, "Hello"); select * from Test where id IN ('1a', 'a2', '3z', '400', '50xyz'); How to repeat: When comparing with an integer value, it looks for the first numerical part and matches the first occurrence. If compared to a numeric value if it works, it happens only when comparing numeric value vs. string.