Subject Re: Transaction and concurrent updates
Author Roman Rokytskyy
> Thanks for explanation. I did some more experiments, and I found
> another problem, which I don't understand. I'am doing two concurrent
> selects from two connections and then I update the selected field to
> be one more than the selected value. This is again from both
> connections. The total increment should be of two but it is just
> one. If I try the same thing from two isql consoles in the same
> order, it reports a deadlock, but JayBird does not. Is it a bug?

Do you issue commit after each update in isql? Your Java code simply
does not have any update conflict, so there cannot be any deadlock.
Move your commits to the end of the code before closing statements and
you will see what you want (again, do not forget to use
isc_tpb_nowait, otherwise you will have to wait quite a long time).

What are you trying to test? If you want to know if driver+server
handles deadlocks correctly, check
org.firebirdsql.jdbc.TestFBConnection class, there's test case for
exactly this topic.

Best regards,
Roman Rokytskyy