Bug #6115 | INSERT records to table with auto increment field fails regularly after 65600 | ||
---|---|---|---|
Submitted: | 15 Oct 2004 14:05 | Modified: | 21 Oct 2004 18:12 |
Reporter: | [ name withheld ] | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | Connector / NET | Severity: | S1 (Critical) |
Version: | 1.0.0 beta | OS: | Windows (Windows XP) |
Assigned to: | Reggie Burnett | CPU Architecture: | Any |
[15 Oct 2004 14:05]
[ name withheld ]
[19 Oct 2004 16:33]
MySQL Verification Team
Could you please provide the desc table_name output command for to see what type of int are you using ? Anyway please see: http://dev.mysql.com/doc/mysql/en/Numeric_types.html if you aren't having storage capacity issue.
[19 Oct 2004 16:59]
[ name withheld ]
I checked this before submitting the bug. The table is using the type unsigned integer ( int(10) unsigned in the desc table_name). If this was the problem, then I would not be able to continue adding small groups of records when I would re-run my program to add the records. The range at which it stops certainly seems to suggest an overflow of an unsigned 2 byte integer, but if so it is internal to Connector/Net, and not my table.
[19 Oct 2004 17:02]
[ name withheld ]
For completeness, and since you asked: mysql> desc files; +--------------------+-----------------------+------+-----+---------------------+----------------+ | Field | Type | Null | Key | Default | Extra | +--------------------+-----------------------+------+-----+---------------------+----------------+ | FileID | int(10) unsigned | | PRI | NULL | auto_increment | | FileName | varchar(100) | | | | | | FileExtension | varchar(10) | YES | | NULL | | | FileStatus | varchar(20) | | | | | | FileDateCreated | datetime | | | 0000-00-00 00:00:00 | | | FileDateCheckedOut | datetime | YES | | NULL | | | FileDateImported | datetime | | | 0000-00-00 00:00:00 | | | FileCheckedOutByID | int(10) unsigned | YES | | NULL | | | FileLatestVersion | smallint(5) unsigned | | | 0 | | | IconID | smallint(5) unsigned | YES | MUL | NULL | | | FileCreatorID | mediumint(8) unsigned | | MUL | 0 | | | FileDescription | text | YES | | NULL | | | FileCustomer | varchar(100) | | | | | | FileJobNumber | mediumint(8) unsigned | YES | | NULL | | | FileDwgNumber | varchar(30) | YES | | NULL | | | FileDrawnBy | varchar(50) | YES | | NULL | | | FileEngineer | varchar(50) | YES | | NULL | | | FileApprovedBy | varchar(50) | YES | | NULL | | | FileSheetNumber | varchar(20) | YES | | NULL | | | FileTitleBlockDate | date | YES | | NULL | | | FileDwgRevNumber | smallint(5) unsigned | YES | | NULL | | | FileContactPerson | varchar(50) | YES | | NULL | | | FileNSN | varchar(25) | YES | | NULL | | | FileLocation | varchar(45) | YES | | NULL | | | FileMill | varchar(45) | YES | | NULL | | | FileLine | varchar(45) | YES | | NULL | | | FileEquiptment | varchar(45) | YES | | NULL | | | FileType | varchar(30) | | | | | | FileJobTitle | varchar(45) | YES | | NULL | | +--------------------+-----------------------+------+-----+---------------------+----------------+ 29 rows in set (0.00 sec)
[19 Oct 2004 17:54]
MySQL Verification Team
Ok..thank you..I just wanted to be sure that the issue wasn't related to the storage capacity of the column type.
[21 Oct 2004 18:12]
Reggie Burnett
Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.mysql.com/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to 'Open'. Thank you for your interest in MySQL. Additional info: Can you reduce this down to the smallest table that shows the problem and send me a simple test program (with source) that will show it. Also, what version of MySQL are you running?
[21 Oct 2004 21:06]
[ name withheld ]
I have attached a .zip containing a sample program (a console app) and a .sql for the table. It's a very simple table, one integer column that auto-increments. When I run the project, it iterates through creating rows in the table in batches of 5000. When it's trying to update the batch for rows 65000 to 70000, it hangs. If you don't want to wait that long, you can set the autoincrement number to start from up higher (just realize that the counter in the console will still count from 1). I'm using MySQL 4.1.5-gamma-nt
[21 Oct 2004 21:10]
[ name withheld ]
Sorry, I spoke too soon. When I try to attach the file, I get a 'The page cannot be displayed' browser error. I hope you don't mind, but I'm going to send it to your listed address reggie@mysql.com.
[29 Oct 2004 19:00]
[ name withheld ]
Did you get the sample application I sent? Have you been able to reproduce the issue? Please let me know what the status of this issue is, and if it has changed. Thanks, Ray G.