Bug #117941 Inconsistent query results with / without NOT NULL for BLOB type
Submitted: 10 Apr 13:29 Modified: 10 Apr 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 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 14:43] MySQL Verification Team
Hello John,

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

regards,
Umesh