http://dev.mysql.com/doc/mysql/en/innodb-auto-increment-column.html

Rishi Daryanani wrote:
Hi,

My database is mostly made up of MyIsam tables, and some InnoDB tables.

One particular Innodb table works fine with an auto increment field.
The table is updated often, records being added and deleted at pretty
much the same rate.

So, there are only a very few records in the table at any given time.

It was being used and the "auto increment" value was around 21.
Recently, after the records were deleted in the system (by my client -
through a database system that I created - NOT directly via the db), I
noticed that new records to the table start with the auto increment
field '1'.

I don't understand this. The autoincrement field seems to have reset
itself back to 0. I know this because there are now 3 records in that
table with ids 1,2,3

I tested it again by adding a new record, which was assigned the id 4.
Then, i deleted that, and added a new record, which was assigned the
id 5.

So its working as normal again! I just dont understand how Mysql reset
the autoincrement field from 21 back to 0

Can anyone think of a reason why this would happen? I'm really worried
about the database now :(

Thanks very much!



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to