Bug #79810 Extreme big number with IN operator gives in consistent result

Submitted: 30 Dec 2015 10:03 Modified: 30 Dec 2015 13:41
Reporter: Su Dylan Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: DML Severity:S3 (Non-critical)
Version:5..1/5.5/5.6/57 OS:Any
Assigned to: CPU Architecture:Any

[30 Dec 2015 10:03] Su Dylan
Description:
Output:
=======
mysql> select -9223372036854775808 in (-9223372036854775809,9223372036854775808);
+--------------------------------------------------------------------+
| -9223372036854775808 in (-9223372036854775809,9223372036854775808) |
+--------------------------------------------------------------------+
|                                                                  1 |
+--------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> select -9223372036854775808 in (-9223372036854775809);
+------------------------------------------------+
| -9223372036854775808 in (-9223372036854775809) |
+------------------------------------------------+
|                                              0 |
+------------------------------------------------+
1 row in set (0.00 sec)

mysql> select -9223372036854775808 in (9223372036854775808);
+-----------------------------------------------+
| -9223372036854775808 in (9223372036854775808) |
+-----------------------------------------------+
|                                             0 |
+-----------------------------------------------+
1 row in set (0.00 sec)

mysql> select version();
+-----------+
| version() |
+-----------+
| 5.7.8-rc  |
+-----------+
1 row in set (0.00 sec)

Problem:
========

How to repeat:
select -9223372036854775808 in (-9223372036854775809,9223372036854775808);
select -9223372036854775808 in (-9223372036854775809);
select -9223372036854775808 in (9223372036854775808);

Suggested fix:
select -9223372036854775808 in (-9223372036854775809,9223372036854775808) returns false.
[30 Dec 2015 13:31] MySQL Verification Team
Results

Attachment: bug79810.txt (text/plain), 8.38 KiB.

[30 Dec 2015 13:41] MySQL Verification Team
Thank you for the bug report. Repeatable on version 5.1/5.5/5.6/5.7 (5.0 version isn't affected).

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

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