Bug #117941 Inconsistent query results with / without NOT NULL for BLOB type

Submitted: 10 Apr 2025 13:29 Modified: 10 Apr 2025 14:43
Reporter: John Jove Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Optimizer Severity:S2 (Serious)
Version:8.0.41, 8.4.4, 9.2.0 OS:Any
Assigned to: CPU Architecture:Any

[10 Apr 2025 13:29] John Jove
Description:
Run the following two cases, in which the same query should return the same result.
I think {-1} is the correct result.

How to repeat:
-- case 1
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (c1 MEDIUMBLOB NOT NULL);
INSERT INTO t1 (c1) VALUES (-1);
INSERT INTO t1 (c1) VALUES (-2);
SELECT c1 AS r1 FROM t1 WHERE (CEIL(c1) <= ALL (SELECT c1 FROM t1)) IS FALSE; -- {}

-- case 2
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (c1 MEDIUMBLOB);
INSERT INTO t1 (c1) VALUES (-1);
INSERT INTO t1 (c1) VALUES (-2);
SELECT c1 AS r2 FROM t1 WHERE (CEIL(c1) <= ALL (SELECT c1 FROM t1)) IS FALSE; -- {-1}
[10 Apr 2025 14:43] MySQL Verification Team
Hello John,

Thank you for the report and test case.
Verified as described.

regards,
Umesh

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.