Bug #120679 Incorrect result for `NOT (col NOT IN IFNULL(...))`
Submitted: 13 Jun 17:35
Reporter: mu mu Email Updates:
Status: Open Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:9.6.0 OS:Ubuntu
Assigned to: CPU Architecture:Any

[13 Jun 17:35] mu mu
Description:
`WHERE NOT ((t0.c0) NOT IN (IFNULL(0.8133607604160736, NULL)))` should return **0** rows, but MySQL 9.6.0 returns **1** row.

How to repeat:
DROP TABLE IF EXISTS `t0`;

CREATE TABLE `t0` (
  `c0` tinyint DEFAULT NULL,
  KEY `i0` (`c0`)
);

INSERT INTO `t0` (`c0`) VALUES (NULL);
INSERT INTO `t0` (`c0`) VALUES (-128);
INSERT INTO `t0` (`c0`) VALUES (-128);
INSERT INTO `t0` (`c0`) VALUES (0);
INSERT INTO `t0` (`c0`) VALUES (1);

SELECT t0.c0 AS ref0 FROM t0 WHERE (NOT ((t0.c0) NOT IN (IFNULL(0.8133607604160736, NULL))));