Susanne Ebrecht, 28.07.2009 06:34:
> According to my researches here I would recommend that we avoid to reset
> AUTO_INC during TRUNCATE. Users won't expect such a behaviour.
> Especially not, when they used SERIAL. The only way to change/reset
> AUTO_INC should be via ALTER.
Thank you very much for your analyze. I suggest you to file a bug report
In the backup team we still have the problem to restore the
auto_increment value to what it was at the time of BACKUP. Even if
TRUNCATE would not change the value, with the current locking scheme,
concurrent DML on freshly created tables could modify the value. This
could also happen during data load. So we still need a solution to
restore the value after data load. Unless we decide that a reproduction
of the auto_increment value is not a requirement for BACKUP/RESTORE.
Ingo Strüwing, Database Group
Sun Microsystems GmbH, Sonnenallee 1, D-85551 Kirchheim-Heimstetten
Geschäftsführer: Thomas Schröder, Wolfgang Engels, Wolf Frenkel
Vorsitzender des Aufsichtsrates: Martin Häring HRB München 161028