I would be happy if Derby can consume identity values even if current
insert statement fails. For this case, some insert statements may fail
when they generate a value that is already present. But subsequent
inserts should pass.
I wonder if the counter should be bumped to the max value on a failed
insert, there is only a problem if a unique index exists, so getting the
max will be fast.
I'm not sure why the user would want *any* inserts to fail. If the
database can figure out the current max, and generate a new value which
is beyond that, thus causing the insert to succeed, then that seems like
the best outcome.
thanks,
bryan