Subject Re: [firebird-support] reword question re: selects in firebird in transactions
Author Mark Rotteveel
On 13-9-2015 20:01, thirdshiftcoder@... [firebird-support] wrote:
> I am just practicing. I might have posted a confusing question before.
>
> I want to see how selects behave differently with being in different
> isolation contexts rather than just running the default snapshot like in
> isql with nothing else going on (no other transactions).
>
> This is an example of a situation where a select might behave a little
> differently when dealing with different isolation levels. The first
> select locks the entire table, and the second select tries to read the
> employee table, and it can't even read the record with emp_no 144 until
> the first change is committed.
>
> I will continue to practice with two flameRobins open.

Note that in flamerobin you need to configure the transaction using menu
Statement > Transaction Settings, not using set transaction. And its
naming of transaction isolations doesn't match. You might be better off
using two isql sessions for your experiments

> Here are two different transactions and queries.
>
> 1. set transaction read only table stability wait;
> update employee set last_name = 'k135' where emp_no = 144;

This is an invalid transaction option and gives an error, as it should
be snapshot table stability, also note that performing an update in a
read only transaction is not allowed and would give an error ("The
INSERT, UPDATE, DELETE, DDL or authorization statement cannot be
executed because the transaction is inquiry only").

> 2. set transaction read only read committed record_version no wait;
> select * from employee;

What is your question?

--
Mark Rotteveel