Subject Re: Deadlock with select-storedprocedure
Author josef_gschwendtner
--- In firebird-support@yahoogroups.com, Thomas Steinmaurer <ts@...>
wrote:
>
> Josef,
>
> > once in a while we get a deadlock executing the statement "Select
* from
> > SP_SWAP_MD(Someparameters)".
> > SP_Swap_MD is a stored procedure which only contains a select-
statement
> > joining 3 tables.
> >
> > Details:
> > - The exception is: java.sql.SQLException: GDS Exception.
335544336.
> > deadlock
> > - All transactions do have the isolation-level READ_COMMITTED
(Jaybird)
> >
> > Although, there might be an update performed to one of these
tables at
> > the time this stored proc is executed, we kind of thought there
is no
> > deadlock with select-queries. Is this wrong?
> >
> > If it is wrong, under which circumstances a deadlock can occure
during a
> > select-statement (read).
>
> If you have started your transaction for the selectable stored
procedure
> with the NO_RECVERSION option, then it won't be able to read a
record
> which has been updated by a transaction yet uncommitted.
>
> "Good" old MSSQL2000 style. ;-)
>

We use Jaybirds "TRANSACTION_READ_COMMITTED" which (as far as we know)
sets internally :
isc_tpb_write
isc_tpb_wait
isc_tpb_read_committed
isc_tpb_rec_version

Josef