2 messages in com.mysql.lists.bugsINNODB Functionality different from M...
FromSent OnAttachments
Peter Zaitsev04 Jun 2001 02:22 
Michael Widenius04 Jun 2001 12:05 
Subject:INNODB Functionality different from MYISAM and BDB
From:Michael Widenius (mon@mysql.com)
Date:06/04/2001 12:05:16 PM
List:com.mysql.lists.bugs

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