auto_increment not resettable

[email protected]
Newsgroups gmane.comp.db.mysql.bugs
Message-ID <[email protected]>
in MySQL 4.0.16 (linux x86 rpms), auto_increment doesn't seem to be
resettable, neither using "alter table auto_increment" nor by inserting
an earlier key.

create table x (id int auto_increment, primary key (id));
insert into x values ();
insert into x values ();
insert into x values ();
delete from x where id in (1,2);
alter table x auto_increment = 1; #this doesn't work
insert into x (id) values (1); #and this doesn't work either
insert into x values();
select * from x;

this yields
1
3
4
instead of 
1
2
3

thanks!

-- 
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe:    http://lists.mysql.com/[email protected]
script (text/plain, 322 B)
create table x (id int auto_increment, primary key (id));
insert into x values ();
insert into x values ();
insert into x values ();
delete from x where id in (1,2);
alter table x auto_increment = 1; #this doesn't work
insert into x (id) values (1); #and this doesn't work either
insert into x values();
select * from x;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.