Subject | Re: Transaction and concurrent updates |
---|---|
Author | Roman Rokytskyy |
Post date | 2004-03-21T20:39:46Z |
> Thanks for explanation. I did some more experiments, and I foundDo you issue commit after each update in isql? Your Java code simply
> 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?
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