Bug #119586 Inconsistent results for date conversion

Submitted: 23 Dec 2025 9:09 Modified: 26 Dec 2025 16:49
Reporter: John Jove Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Data Types Severity:S1 (Critical)
Version:8.4.7 OS:Any
Assigned to: CPU Architecture:Any

[23 Dec 2025 9:09] John Jove
Description:
Run the following two cases, which are expected to return the same result.

How to repeat:
DROP TABLE t1;
CREATE TABLE t1 (c1 SMALLINT);
INSERT INTO t1 VALUES(1);
SELECT nullif(date(0), c1) FROM t1; -- {NULL}

DROP TABLE t1;
CREATE TABLE t1 (c1 BIGINT UNSIGNED);
INSERT INTO t1 VALUES(1);
SELECT nullif(date(0), c1) FROM t1; -- {0}
[26 Dec 2025 16:49] Roy Lyseng
Verified as described.

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

Page generated in 0.048 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.