Hej Lubic!
Gör följande.
InnoDB
1. Ta bort en post från tabellen. Inkrementellt värde ser ut att vara samma som innan. Dvs om pekar var på position 5 så står det fortfarande 5.
2. service mysql restart (t.ex. omstart av databasen)
3. Inkrementellt värde har nu minskat till 4
MyIsam (ändra samma tabell till MyIsam)
Samma procedur som ovan behåller räknarens inkrementella värde även efter omstart .
Se
länk.
Citat:
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.
|