Bug #28943 Incorrect crc32 with distinct
Submitted: 7 Jun 2007 12:22 Modified: 7 Jun 2007 13:43
Reporter: Vadim TKACHENKO Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0.41 OS:Any
Assigned to: CPU Architecture:Any

[7 Jun 2007 12:22] Vadim TKACHENKO
Description:
Using distinct changes value of CRC32 function

mysql> select id,crc32(id) from cr; 
+--------------+------------+
| id           | crc32(id)  |
+--------------+------------+
| 553371639041 | 3424179739 | 
| 553371639042 | 1427212193 | 
| 553371639043 |  571914039 | 
+--------------+------------+
3 rows in set (0.00 sec)

mysql> select distinct id,crc32(id) from cr;
+--------------+------------+
| id           | crc32(id)  |
+--------------+------------+
| 553371639041 | 2147483647 | 
| 553371639042 | 1427212193 | 
| 553371639043 |  571914039 | 
+--------------+------------+

How to repeat:
CREATE TABLE `cr` (
  `id` bigint(20) unsigned NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1

insert into cr values (553371639041),(553371639042),(553371639043);
[7 Jun 2007 13:43] Sveta Smirnova
Thank you for the report.

I can not repeat described behaviour with current sources, although bug is repeatable with version 5.0.41