2 messages in com.mysql.lists.mysqlAutoincrement in MultiColumn primary ...
FromSent OnAttachments
Matthew Walker12 Jul 2002 14:29 
Wouter van Vliet13 Jul 2002 13:13 
Subject:Autoincrement in MultiColumn primary key?
From:Matthew Walker (mwal@mthmarketing.com)
Date:07/12/2002 02:29:59 PM
List:com.mysql.lists.mysql

filter: sql,query

I did some tests recently on a two column primary key, one of which was an autoincrement column. It worked nicely, maintaining a separate increment for every unique value in the second column. I was ecstatic, as this was exactly what I need for some tables I'm designing.

However, today I tried to use the same idea in a three column primary key, and it seems to be acting like a lone autoincrement column, instead of how it acted with two columns.

What I want to know, is this: Is the two-column behavior an official feature, or is it an unintended effect? I personally /love/ that behavior, and think it should be a feature, but before I go further, I need to know if I can count on it to hang around. And if it is a feature, why it doesn't work in three column indexes.

Please CC the reply-to address in your responses.