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: "generated by default" question
Date Fri, 09 Jun 2006 15:58:25 GMT
There is a Jira issue already opened. 
Someone pointed to an earlier thread in which Daniel already recommended a
solution.

I don't find fault with Craig's comment.
I was thinking in the debate between myself and Bernt.

The issue is that while you can look towards the standards on sequences,
when you have an identity column that auto-generates a value, you have to
account for the fact that someone can insert a row that has an unused
identity value and that the sequence hasn't generated a value that large
yet.

It's a bug if you ask for Derby to generate an identity value and then it
fails because the sequence returns a value that is already in use.
(I.e. someone inserts a row with the identity value of 10 and the sequence
is only at 6. So that when the sequence returns a value of 10, the insert
will fail...)

My point is that there is a recognized problem, and it's a defect. Since
there are two well established corporations which are profiting from selling
support for Cloudscape/Derby/JavaDB, then they should step up to the plate
and fix the problem.

It would be different if we were looking for an enhacement or a feature
request. Then there would be no obligation to implement the
enhancement/feature....


> -----Original Message-----
> From: Jean T. Anderson [mailto:jta@bristowhill.com]
> Sent: Friday, June 09, 2006 10:33 AM
> To: Derby Discussion
> Subject: Re: "generated by default" question
> 
> Michael Segel wrote:
> <snip>
> > Having said that, Daniel already made a suggestion which is in use today
> by
> > other databases....
> >
> > The simplest solution would be to find the MAX value, rest the sequence
> to
> > MAX() +1 and re-insert the row.
> >
> > There are other possible solutions.
> >
> > It's disappointing that certain people don't accept this as a bug
> 
> Craig Russell wrote earlier in this thread [1]:
> 
> > Do you have a good solution that you can write up in detail and post  to
> JIRA? Then someone with an itch can fix it. Do-ocracy in action.
> 
> Anyone is welcome to open a Jira issue. Jira assistance is at
> http://db.apache.org/derby/DerbyBugGuidelines.html .
> 
>  -jean
> 
> [1]
> http://mail-archives.apache.org/mod_mbox/db-derby-
> user/200605.mbox/%3cDD522070-780A-4C31-B095-0009E49EFEA2@SUN.com%3e



Mime
View raw message