Bug #116556 | Inconsistent Results with IN Clause for Binary Data | ||
---|---|---|---|
Submitted: | 5 Nov 2024 11:04 | Modified: | 5 Nov 2024 12:15 |
Reporter: | Wenqian Deng | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 9.0 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[5 Nov 2024 11:04]
Wenqian Deng
[5 Nov 2024 11:54]
MySQL Verification Team
Hi Mr. Deng, Thank you for your bug report. However , this is not a bug. SQL Standard clearly stipulates that you can not use different column and data types in a single expression. However, you are mixing types BIT, TIME and LONG INT in a single expression. MySQL tries it's best (contradicting SQL Standard) and tries to find a common denominator, which in this case is DOUBLE. Hence , what you get is expected behaviour ...... Not a bug.
[5 Nov 2024 12:15]
Wenqian Deng
However, I think the issue lies in MySQL’s inconsistent handling of identical data. Why do SELECT t1.c0... and SELECT (IF(t0.c0, t0.c1, t0.c2))... lead to different results, given that the value stored in t1.c0 should be the same as (IF(t0.c0, t0.c1, t0.c2))?