Hi!
"Peter" == Peter Zaitsev <pz...@spylog.ru> writes:
Peter> Hello ,
Peter> Some of tables definitions which was correct for MYISAM and BDB does
Peter> not work for INNDB:
Peter> MYISAM:
mysql> create table test(
-> field1 int unsigned not null default 0,
-> field2 int unsigned not null default 0 auto_increment,
-> primary key(field1,field2))
-> ;
Peter> Query OK, 0 rows affected (0.00 sec)
Peter> INNODB:
mysql> create table test(
-> field1 int unsigned not null default 0,
-> field2 int unsigned not null default 0 auto_increment,
-> primary key(field1,field2))
-> /*! type=INNODB pack_keys=1 */;
Peter> ERROR 1075: Incorrect table definition; There can only be one auto column
and it must be defined as a key
I am pretty sure this is documented; InnoDB doesn't support that you
have an auto_increment key on a sub part of a table.
On the other hand, for most people this isn't a big restriction.
Regards,
Monty