Bug #63876 | Reset Auto_Increment | ||
---|---|---|---|
Submitted: | 29 Dec 2011 17:12 | Modified: | 30 Dec 2011 9:58 |
Reporter: | David Colter | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: DDL | Severity: | S4 (Feature request) |
Version: | OS: | Any | |
Assigned to: | CPU Architecture: | Any |
[29 Dec 2011 17:12]
David Colter
[30 Dec 2011 9:58]
Valeriy Kravchuk
I agree that this feature can be useful in some cases. For reference, current behavior is described in the manual, http://dev.mysql.com/doc/refman/5.1/en/alter-table.html: "You cannot reset the counter to a value less than or equal to any that have already been used. For MyISAM, if the value is less than or equal to the maximum value currently in the AUTO_INCREMENT column, the value is reset to the current maximum plus one. For InnoDB, if the value is less than the current maximum value in the column, no error occurs and the current sequence value is not changed."