Re: MySQL 4.0.20 auto_increment bug
Hartmut Holzgraefe <[email protected]> Thu, 5 Aug 2004 17:01:39 +0000 (UTC)
| Newsgroups | gmane.comp.db.mysql.bugs |
|---|---|
| Message-ID | <[email protected]> |
Fred wrote:
> For InnoDB tables, the auto_increment is not handled properly if the
> index is updated thus:
>
> create table foobar (id bigint not null auto_increment, primary key(id),
> name text) type=InnoDB;
>
> insert into foobar (name) values ("red"), ("green"), ("blue");
> -- red is 1, green is 2, blue is 3
>
> update foobar set id = id+10000;
> -- red is 10001, blue is 10002, green is 10003, the next auto_increment
> entry SHOULD BE 10004
>
> insert into foobar (name) values ("white");
> -- white's id is 4 instead of 10004
>
> Version:
> mysql Ver 12.22 Distrib 4.0.20, for pc-linux (i686)
>
> Don't know if this bug exists elsewhere, but I suspect it does.
>
expected behaviour for InnoDB, see
http://dev.mysql.com/doc/mysql/en/InnoDB_auto-increment_column.html
--
Hartmut Holzgraefe <[email protected]>
--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/[email protected]