| Bug #119147 | >= SOME Operator Returns Incorrect Empty Set for TIMESTAMP Comparison | ||
|---|---|---|---|
| Submitted: | 13 Oct 2025 13:39 | Modified: | 13 Jan 10:01 |
| Reporter: | zz z | 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 | |
[13 Jan 10:01]
Roy Lyseng
Thank you for the bug report. Verified as described.

Description: When a table contains a single TIMESTAMP value, a SELECT statement using a WHERE clause with the condition (c1) >= SOME (SELECT c1 FROM ...) incorrectly returns an empty set. The logical condition is effectively X >= X, which should always evaluate to TRUE. How to repeat: CREATE TABLE t849 (c1 TIMESTAMP); INSERT IGNORE INTO t849 (c1) VALUES ('2050-04-19 08:36:49'); SELECT c1 FROM t849 WHERE (((c1) >= SOME (SELECT c1 FROM t849))); -- return null SELECT SUM(count) FROM (SELECT ((((c1) >= SOME (SELECT c1 FROM t849)))) IS TRUE AS count FROM t849) AS ta_norec; -- return 1