Bug #119526 Inconsistent query results caused by the NO_MERGE hint

Submitted: 9 Dec 2025 3:13 Modified: 10 Jan 11:59
Reporter: Go Yakult Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Optimizer Severity:S2 (Serious)
Version:8.0.41 OS:Any
Assigned to: CPU Architecture:Any

[9 Dec 2025 3:13] Go Yakult
Description:
mysql> SELECT v0.c0 AS ref0 FROM v0 WHERE GREATEST(v0.c0, 0.29013432092139513, '2N|Lmozh');
Empty set (0.00 sec)

mysql> SELECT /*+ NO_MERGE(v0)*/ ALL v0.c0 AS ref0 FROM v0 WHERE GREATEST(v0.c0, 0.29013432092139513, '2N|Lmozh'); 
+------+
| ref0 |
+------+
| NULL |
+------+
1 row in set (0.00 sec)

How to repeat:
DROP TABLE IF EXISTS `t0`;
CREATE TABLE `t0` (
  `c0` double unsigned zerofill /*!50606 STORAGE MEMORY */ DEFAULT NULL
)CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
insert into t0 values(NULL);

SELECT v0.c0 AS ref0 FROM v0 WHERE GREATEST(v0.c0, 0.29013432092139513, '2N|Lmozh');
SELECT /*+ NO_MERGE(v0)*/ ALL v0.c0 AS ref0 FROM v0 WHERE GREATEST(v0.c0, 0.29013432092139513, '2N|Lmozh');
[10 Dec 2025 11:59] Roy Lyseng
I cannot repeat the problem.
Is the test case correct, it references both t0 and v0, but only t0 is created?
[11 Jan 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.039 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.