Bug #71257 Key Exception upon millionth insert
Submitted: 30 Dec 2013 23:47 Modified: 1 Feb 2014 7:09
Reporter: Brian Norquist Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: DML Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: CPU Architecture:Any

[30 Dec 2013 23:47] Brian Norquist
Description:
exception in storing a key exactly upon the insert of the "millionth"* row into a table.  
*Note "Millionith" is the power of 2^20th (1048576)

How to repeat:
Configure many different structures of tables:
- primary key, no indexes
- with indexes
- with foriegn indexes

insert 2^20 rows into these test tables, log all messages, shouldn't see ANY messages until the bug is hit.

Look for an exception in storing a key exactly upon the insert of the "millionth"* row into a table.  
*Note it is the power of 2^20th (1048576)

I forget the configuration of the last table where this occured.
and I don't have access to the code anymore.

Thanks,

Brian

Suggested fix:
- Look for masking of 20 bits in handling of keys or references to keys
- 20 bit datatypes related to keys
- shifting of bits that could occur 20 places
- conversion errors
- things related the number: 1048576 (approximately)
- look for side effects of this kind of bug: 
- - cannot retrieve row by key
- - row count doesn't correspond to key count
- - slow access one-in-a-million times
[1 Jan 2014 7:08] MySQL Verification Team
Kindly upload 'SHOW CREATE TABLE ... ' for the affected table.

What is the exact error message you see?
[2 Feb 2014 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".