Bug #120671 Incorrect result for `col IN (IF(...))`

Submitted: 13 Jun 17:30 Modified: 15 Jun 13:29
Reporter: mu mu Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Optimizer Severity:S3 (Non-critical)
Version:9.6.0 OS:Ubuntu
Assigned to: CPU Architecture:Any

[13 Jun 17:30] mu mu
Description:
On identical table data, a `SELECT` with `WHERE (t0.c0) IN (IF(...))` should return **0** rows, but MySQL 9.6.0 returns **1** row.

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

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

INSERT INTO `t0` (`c0`) VALUES (1);

SELECT t0.c0 AS ref0 FROM t0 WHERE (t0.c0) IN (IF(1964541864, 0.5974530509260936, -1153166958));
[15 Jun 13:29] Chaithra Marsur Gopala Reddy
Hi mu mu,

Thanks for the test case. This seems to fixed in the upcoming 9.7 release as part of an internal bug Bug#36448705. So closing thes as a duplicate.

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

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