Hi,

one select do not guarantee consistency if you run something outside of 
transaction context.
And because of this, in Firebird there is no possibility to do this.
consider folowing example

select
*
from
header h
inner join detail d on d.id_h=h.id

server do loop throught streams and:
1. it got header 1 (ver1)
2. it got details for header 1 (ver1)
3. it got header 2.(ver1)
4. other client update header 2(store ver2) and details for header 2(store 
ver2).
5. it got details for header 2(ver2)

as you can see you got inconsistent view in point 5 – 
because you got header 2 ver 1 but details from ver2 – 
but you should got header 2 ver 1 and detail for header 2 ver 1

because of that streams and all other table code work in transaction contexts.

regards,
Karol Bieniaszewski

From: mailto:[email protected] 
Sent: Tuesday, February 23, 2016 4:57 PM
To: [email protected] 
Subject: RE: [firebird-support] firebird and transaction behaviour questions

  
Tim,

Ah. thank you for clarifying this. I always try to do select for a report in
one select statement with joints etc. In the scenario you described below -
yes, we need a transaction.

Tnx.

Regards

Zoran


Reply via email to