db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Segel" <mse...@segel.com>
Subject RE: Altering identity field error
Date Mon, 10 Jul 2006 15:45:33 GMT

So if your problem can be duplicated, then it's a bug.

>From the cheap seats, it looks like when you reset the base value or next
value, its losing the GENERATE BY DEFAULT and somehow the identity column is
being reset to GENERATE ALWAYS. (Not sure which is the default constraint.)

Interestingly enough, if the backing identity index is a B+ Tree, then its
possible to create a routine to find the next identity value such that it
attempts to find a gap in the index to insert a value.

Haven't thought it all the way through, but if you know the order (Number of
levels in the index, your CBV, you should be able to walk the index in a
known finite amount of time.

The only catch is that you wouldn't want to implement this unless you've
gone through at least one cycle.

While some may find this boring, after a 6 pack, large pizza and a lot of
white boarding, this could be something to write about in the ACM.

But hey! What do I know?
(I think I forgot to renew my ACM membership but kept my IEEE)


> -----Original Message-----
> From: Lars Gramark [mailto:lars@stickybit.se]
> Sent: Monday, July 10, 2006 9:39 AM
> To: derby-user@db.apache.org
> Subject: RE: Altering identity field error
> Right, but according to the documentation this is not available.
> http://db.apache.org/derby/docs/dev/ref/rrefsqlj81859.html
> And I cant find it in the JavaCC grammar either in the source code but I
> could be wrong. Do you have a suggestion of what I should write to get
> around the problem?
> /Lars Gr?mark
> --
> View this message in context: http://www.nabble.com/Altering-identity-
> field-error-tf1917526.html#a5252849
> Sent from the Apache Derby Users forum at Nabble.com.

View raw message