Bug #113586 | IFNULL Incorrect query result | ||
---|---|---|---|
Submitted: | 9 Jan 2024 3:13 | Modified: | 9 Jan 2024 10:49 |
Reporter: | Ye Shiyang | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S3 (Non-critical) |
Version: | 8.0 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[9 Jan 2024 3:13]
Ye Shiyang
[9 Jan 2024 10:49]
MySQL Verification Team
Hi Mr. eric, Thank you for your bug report. Yes, this is a very small bug in our Optimiser, but still it is a bug. We have found EXACTLY where a bug occurs ....... SELECT f1 FROM (SELECT t0.c0 >> IFNULL("\r8*&t", NULL) AS f1 FROM t0) as t +------+ | f1 | +------+ | 512 | +------+ SELECT f1 FROM (SELECT t0.c0 >> IFNULL("\r8*&t", NULL) AS f1 FROM t0) as t WHERE f1 != 123 +------+ | f1 | +------+ | 2 | +------+ it is the WHERE filtering that confused the optimiser. Since 5.7 is no longer maintained, this is now a verified bug for the version 8.0 and all higher versions.