Re: Delete from $table und der Autoincrement Wert

Sergei Golubchik <[email protected]> Mon, 11 Oct 2004 12:44:46 +0200
Newsgroups gmane.comp.db.mysql.bugs
Message-ID <[email protected]>
Hi!

On Sep 30, Thomas Schmieder wrote:
> MySQL 4.0.12
> 
> Eine Tabelle TEMP mit
> 
>   ID_TEMP bigint unsigned autoincrement primary key
>   ID_FOREIGN
> 
> wird mit Werten gef?llt und dann verarbeitet.
> Anschlie?end wird sie mit
> 
>   delete from TEMP
> 
> geleert, um sie f?r den n?chsten Verwendungsfall (Schleife) vorzubereiten.
> 
> Delete from TEMP setzt aber den Autoincrement-Key nicht zur?ck.

It's a documented behaviour.
See the manual for DELETE, TRUNCATE, and AUTO_INCREMENT
 
Regards,
Sergei

-- 
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /   Sergei Golubchik <[email protected]>
 / /|_/ / // /\ \/ /_/ / /__  MySQL AB, Senior Software Developer
/_/  /_/\_, /___/\___\_\___/  Osnabrueck, Germany
       <___/  www.mysql.com

-- 
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe:    http://lists.mysql.com/[email protected]