List:General Discussion« Previous MessageNext Message »
From:Aveek Misra Date:April 22 2010 5:03am
Subject:Auto Increment in InnoDB
View as plain text  
I have a InnoDB table which contains columns named 'cluster' and 'file' 
('cluster' + 'file' is a primary key). I want to add a new column that 
tracks the revision number of a file for a given cluster and a file. The 
situation is tailor made for a MyIsam table where I can add a new Auto 
Increment column as a secondary column in a multiple column index. How 
can I get the same behavior in an InnoDB table? Given below is a view of 
how the records will look like

--------------------------------------------------------
| Cluster             |    File                |   Rev       |
--------------------------------------------------------
| clusterA           |   fileA               |   1            |
--------------------------------------------------------
| clusterA           |   fileA               |   2            |
---------------------------------------------------------
| clusterB           |   fileA               |   1            |
--------------------------------------------------------
| clusterB           |   fileB               |   1            |
--------------------------------------------------------



Thanks
Aveek
Thread
Auto Increment in InnoDBAveek Misra22 Apr
  • Re: Auto Increment in InnoDBJohan De Meersman22 Apr
    • Re: Auto Increment in InnoDBAveek Misra22 Apr
      • Re: Auto Increment in InnoDBJohan De Meersman22 Apr
        • Re: Auto Increment in InnoDBAveek Misra22 Apr
          • Re: Auto Increment in InnoDBJohan De Meersman22 Apr
            • Re: Auto Increment in InnoDBAveek Misra22 Apr
              • Re: Auto Increment in InnoDBJohan De Meersman22 Apr
            • Re: Auto Increment in InnoDBCarsten Pedersen22 Apr
              • Re: Auto Increment in InnoDBJohan De Meersman22 Apr
                • Re: Auto Increment in InnoDBChris W22 Apr
                  • Re: Auto Increment in InnoDBJohan De Meersman23 Apr
  • Re: Auto Increment in InnoDBmos22 Apr