hi.
from the manual:
If you delete the row containing the maximum value for an AUTO_INCREMENT
column, the value will be reused with an ISAM, or BDB table but not with a
MyISAM or InnoDB table. If you delete all rows in the table with DELETE FROM
table_name (without a WHERE) in AUTOCOMMIT mode, the sequence starts over
for all table types.
what type is the table you're using?
hth.
-ravi.
-----Original Message-----
From: William N. Zanatta [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 20, 2001 3:54 PM
To: mysql
Subject: auto_increment, is this a bug?? Where to report it?
Hello guys...
I'm having problem with the auto_increment feature.
I have a table like this...
+--------+-----------------+------+-----+------------+----------------+
| Field | Type | Null | Key | Default | Extra
|
+--------+-----------------+------+-----+------------+----------------+
| Data | date | | | 0000-00-00 |
|
| Edicao | int(3) unsigned | | PRI | NULL | auto_increment
|
| Status | varchar(6) | | | |
|
+--------+-----------------+------+-----+------------+----------------+
When I make entries to this table, the column Edition goes...
+--------+
| Edicao |
+--------+
| 1 |
| 2 |
| 3 |
+--------+
as expected.
The problem is...if I delete the third entry (Edicao = 3), the next
entry inserted should be 3, right?! Well it is not! It is 4. So I get a
table like this...
+--------+
| Edicao |
+--------+
| 1 |
| 2 |
| 4 |
+--------+
Well, I tested it on 2.33.37, 2.33.38 and 2.33.39. In 2.33.37 it was
right...the entry was 3. But in the newer versions the number was 4.
It's like the auto_increment pointer didn't do the decrement when I
deleted the last entry.
Is this a bug?! Where should it be reported to?
Thank you all...
William N. Zanatta
---------------------------------------------------------------------
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
---------------------------------------------------------------------
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