On Thu, Apr 22, 2010 at 12:09 PM, Aveek Misra <aveekm@stripped> wrote:
> I am not sure I understand. If I make the autoincrement column as part of
> the primary key as (rev + cluster + file), how do I ensure that a reset of
> the revision number is done as soon as (cluster + file) combination changes?
You want the autoincrement to go up every time you change the values in your
primary key ?
Aside from it not being a recommended practice, to put it mildly, that you
update primary key values (possible referential inconsistency), I'm not
aware of this behaviour in MyISAM, either.
An autoincrement is assigned if, and only if you assign NULL or (zero) to an
autoincrement column during an insert.
If your application behaves differently, it is probably already done either
in the application, or possibly through the use of triggers.
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel