Re: serial primary key produces two indexes

2005-09-14 Thread Kemin Zhou
Thank Gleb, I misunderstood the meaning of the manual.. this is from the manual == |SERIAL| is an alias for |BIGINT UNSIGNED NOT NULL AUTO_INCREMENT|. |SERIAL DEFAULT VALUE| in the definition of an integer column is an alias for |NOT NULL AUTO_INCREMENT UNIQUE|.

Re: serial primary key produces two indexes

2005-09-13 Thread Gleb Paharenko
Hello. SERIAL is an alias for BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE. So you really specifying two keys (primary and unique). See: http://dev.mysql.com/doc/mysql/en/news-4-1-0.html http://bugs.mysql.com/bug.php?id=13140 Kemin Zhou [EMAIL PROTECTED] wrote: I

serial primary key produces two indexes

2005-09-12 Thread Kemin Zhou
I recently discovered that the following create table ttt ( id serial primary key, txt text ); show index from ttt is telling me that there is a primary ke on id column with BTREE and at the same time, there is another unique index on the id column. This is redundant. if the id