Subject Re: [firebird-support] SELECT WITH LOCK, WAIT transaction, deadlock
Great, Thanks!

On Friday, April 29, 2016 10:26 AM, "Gabor Boros gaborboros@... [firebird-support]" <> wrote:

2016. 04. 28. 21:22 keltezéssel, Ann Harrison aharrison@...
[firebird-support] írta:
> Okay...  What's the requirement that keeps you from using generators?

I need number generators which give back sequence numbers without
skipping and repeating. But don't know how many needed. The number of
needed generators depend on the customers(X Ltd., Y Ltd, ...). This is
why I want to store the generators in a table.

> Do you intend to grab the number in a transaction that does other work?

The transaction do other work before grab the number and after grab the
number. The whole thing is in a (one) stored procedure. (Works like a
charm except deadlocks.)

> What is the concurrency requirement?

If I understand your question correctly... I don't think will be high
load but I test is because not want to see deadlock in production.

> What you're thinking about doing
> will serialize the generation of identifiers and all other actions of
> those transactions.  I'm not totally convinced that using
> ReadCommitted/wait will create an auditable series of numbers in the
> case where a transaction fails.

For testing purposes the test app insert the generated numbers into a
one field table which have a unique constraint. I not see any error
except the deadlocks.





Visit and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at


Yahoo Groups Links

<*> To visit your group on the web, go to:

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    (Yahoo! ID required)

<*> To change settings via email:

<*> To unsubscribe from this group, send an email to:

<*> Your use of Yahoo Groups is subject to: