Bug #114224 | Incorrect query result may caused by INDEX and Type conversion | ||
---|---|---|---|
Submitted: | 5 Mar 2024 14:10 | Modified: | 5 Mar 2024 15:23 |
Reporter: | Ye Shiyang | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Data Types | Severity: | S4 (Feature request) |
Version: | 8.0 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[5 Mar 2024 14:10]
Ye Shiyang
[5 Mar 2024 15:23]
MySQL Verification Team
Hi Mr. Shiyang, Thank you for your bug report. We were able to repeat your test case: Level Code Message Warning 1366 Incorrect integer value: 'c' for column 'c0' at row 1 c0 0 c0 0 Level Code Message Warning 1366 Incorrect integer value: 'c' for column 'c0' at row 1 c0 0 Hence, there is a different result, with or without the index. However, this is a very low priority bug. First of all, as our Manual clearly points out, ABS() can be used ONLY with integers. However, instead of integers, you are using string , in this case "c" or floating point (0.1). That is why this is a very low priority bug. It is verified only due to different behaviour due to the presence of an index. SQL Standard strictly prohibits conversion between different types. The only bug is in the different behaviour, as explained above. Verified as a feature request.