| Bug #117186 | result is incorrect | ||
|---|---|---|---|
| Submitted: | 13 Jan 3:01 | Modified: | 13 Jan 7:08 |
| Reporter: | haizhen xue | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: DML | Severity: | S2 (Serious) |
| Version: | 8.0.40, 8.4.3 | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
[13 Jan 7:08]
MySQL Verification Team
Hello haizhen xue, Thank you for the report and test case. regards, Umesh
[15 Jan 6:33]
huahua xu
Add a test case:
mysql> insert into t values(1922549940456259800, 1922549940456259800);
mysql> select * from t where (a,b) in (('1922549940456259800','1922549940456259800'));
+---------------------+---------------------+
| a | b |
+---------------------+---------------------+
| 1922549940456259800 | 1922549940456259800 |
+---------------------+---------------------+
[15 Jan 6:36]
huahua xu
mysql> select * from t where (a,b) in (('1922549940456259743','1922549940456259743'));
+---------------------+---------------------+
| a | b |
+---------------------+---------------------+
| 1922549940456259800 | 1922549940456259800 |
+---------------------+---------------------+

Description: Statement 1: select * from t where (a,b) in (('1922549940456259743','1922549940456259743')); Statement 2:select * from t where (a,b) in (('1922549940456259743','1922549940456259743'), ('1922549940456259743','1922549940456259743')); expect Statement 1 and Statement 2 has the same result, but Statement 1 has empty result. Statement 2 has one row result. mysql> create table t(a bigint, b bigint); ), ('1922549940456259743','1922549940456259743'));Query OK, 0 rows affected (0.07 sec) mysql> insert into t values(1922549940456259743, 1922549940456259743); Query OK, 1 row affected (0.01 sec) mysql> select * from t where (a,b) in (('1922549940456259743','1922549940456259743')); Empty set (0.00 sec) mysql> select * from t where (a,b) in (('1922549940456259743','1922549940456259743'), ('1922549940456259743','1922549940456259743')); +-----------+------------+ | a | b | +-----------+------------+ | 958425566 | 1303918987 | +-----------+------------+ 1 row in set (0.00 sec) How to repeat: mysql> create table t(a bigint, b bigint); ), ('1922549940456259743','1922549940456259743'));Query OK, 0 rows affected (0.07 sec) mysql> insert into t values(1922549940456259743, 1922549940456259743); Query OK, 1 row affected (0.01 sec) mysql> select * from t where (a,b) in (('1922549940456259743','1922549940456259743')); Empty set (0.00 sec) mysql> select * from t where (a,b) in (('1922549940456259743','1922549940456259743'), ('1922549940456259743','1922549940456259743')); +-----------+------------+ | a | b | +-----------+------------+ | 958425566 | 1303918987 | +-----------+------------+ 1 row in set (0.00 sec)