Bug #26746 | "delete from tbl" resets the auto_increment | ||
---|---|---|---|
Submitted: | 1 Mar 2007 11:10 | Modified: | 1 Mar 2007 12:39 |
Reporter: | Thorsten Last Name | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: General | Severity: | S3 (Non-critical) |
Version: | 5.0.26-community-max-nt | OS: | Windows (Windows XP Pro) |
Assigned to: | CPU Architecture: | Any | |
Tags: | auto_increment, last_insert_id(), reset |
[1 Mar 2007 11:10]
Thorsten Last Name
[1 Mar 2007 11:32]
MySQL Verification Team
Thank you for the bug report. I assume you have the InnoDB engine as default table type. If it is the case please read: http://dev.mysql.com/doc/refman/5.0/en/innodb-auto-increment-column.html "InnoDB uses the in-memory auto-increment counter as long as the server runs. When the server is stopped and restarted, InnoDB reinitializes the counter for each table for the first INSERT to the table, as described earlier." in this case it is a documented behavior.
[1 Mar 2007 12:39]
Thorsten Last Name
Wow, this was fast! Yes, the table type is innoDB. I think it would be best to switch the type to "myIsam". Although ... there is nos support for transactions in myIsam tables... I think, this bug-report is closed.