| Bug #120670 | Incorrect result for `NOT(...) && GREATEST(...) AND literal` | ||
|---|---|---|---|
| Submitted: | 13 Jun 17:30 | Modified: | 16 Jun 6:38 |
| Reporter: | mu mu | Email Updates: | |
| Status: | Not a Bug | Impact on me: | |
| Category: | MySQL Server: Optimizer | Severity: | S3 (Non-critical) |
| Version: | 9.6.0 | OS: | Ubuntu |
| Assigned to: | CPU Architecture: | Any | |
[13 Jun 17:30]
mu mu
[16 Jun 6:38]
Chaithra Marsur Gopala Reddy
Hi mu mu, This is not a bug. The result depends on GREATEST(c0, ...) with c0 defined as INT UNSIGNED ZEROFILL. In this case it affects the expression result type/value. For c0 = 0, MySQL returns the ZEROFILL-formatted column value from GREATEST(...), which makes the predicate evaluate to true, so returning 4 rows is expected.
