Bug #106651 Query wrong result when the condition is "where id ('decimal_a', 'decimal_b')"
Submitted: 7 Mar 2022 4:34 Modified: 7 Mar 2022 5:51
Reporter: Zhang JiYang Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Optimizer Severity:S1 (Critical)
Version:5.7.*, 5.7.37, 8.0.28 OS:Any
Assigned to: CPU Architecture:Any

[7 Mar 2022 4:34] Zhang JiYang
Description:
We found a bug related to 'DECIMAL', which may be a variant of the bug below:

https://bugs.mysql.com/bug.php?id=92729

How to repeat:
mysql> CREATE TABLE `t1` (
  `value` decimal(16,0) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

mysql> insert into t1 values ('9900000000415067'), ('9900000000415069');

mysql> select * from t1 where value IN ('9900000000415050', '9900000000415067');
+------------------+
| value            |
+------------------+
| 9900000000415067 |
| 9900000000415069 |
+------------------+
2 rows in set (0.00 sec)
[7 Mar 2022 5:51] MySQL Verification Team
Hello zanye zjy,

Thank you for the report and test case.

regards,
Umesh
[7 Mar 2022 7:50] George Ma
A similar bug has been verified 3 years but not fixed yet: https://bugs.mysql.com/bug.php?id=92729