Hi.

The behaviour of auto_increment is strange or it's a bug.
All is, what are you described above.
delete from t1;
this command deletes all records and auto_increment will be 1, but if
i use mysql-max (3.23.43 with innoDB - all in my.ini is set to  handle
innoDB)
delete from t1;
leaves auto_increment statement in older position (don't set it to 1), even
t1 is myisam table.
I must disable innoDB feature, then auto_increment field works ok after
delete from t1;
the auto_increment field is 1.

it's o.k  or  it's a bug in mysql-max with innoDB ??

regards I. Piasecki.


----- Original Message -----
From: "Paul DuBois" <[EMAIL PROTECTED]>
To: "Ireneusz Piasecki" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, November 01, 2001 12:42 AM
Subject: Re: Auto_increment


> At 2:03 PM +0100 10/31/01, Ireneusz Piasecki wrote:
> >HI everybody.
> >
> >I saw, when i delete all records from the table where id
> >is primary key and auto_increment, the first number for id is'nt 1 but
next
> >in a row (the last was 5 the next will be 6).
> >
> >Can i change this behavior ? Mybe in file my.ini ?
> >The goal is, that when i delete all records from the table  the id field
> >begin with 1, when i insert a record.
> >
> >I use 3.23.43-max on win98, the table is myisam type.
> >
> >regards. I. Piasecki.
>
> What you observe is what will happen if you delete records using
> DELETE statements that have a WHERE clause.
>
> If you empty the entire table at once like this:
>
> DELETE FROM tbl_name
>
> then the AUTO_INCREMENT value will reset to 1.
>
> This is true for MyISAM tables, not necessarily for other table types.
>


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to