On Fri, Sep 14, 2012 at 5:58 AM, Igor Tandetnik <itandet...@mvps.org> wrote:
> Pavel Ivanov <paiva...@gmail.com> wrote:
>> There's another way how it could make sense - if you read that excerpt
>> in context. ;-) The "statement-level read consistency" definition
>> cited by Petite is the transaction isolation level. I.e. it defines
>> what each statement executed in one transaction can see related to the
>> changes done in another transaction.
>
> Well, in this case, if you only ever execute one statement per transaction in 
> SQLite, then it does support "statement-level read consistency." Though I 
> fail to see how it materially differs from "serializable". Am I missing 
> something obvious?

For one statement per transaction "statement-level consistency" and
"serializable" do not differ, you are right. But IIRC Oracle doesn't
have an auto-commit mode of operation and multi-statement transactions
are more common, especially when we talk about stored procedures,
triggers and things like that. And if you ever call "begin
transaction" or execute multi-statement transactions then serializable
will make sure that your transaction sees only changes committed
before "begin", in "statement-level" you can see changes committed
after "begin". The worst problem of this: with "statement-level
consistency" two identical select queries executed inside the same
transaction can return different results.

>> This isolation level doesn't
>> define visibility of changes done in the same transaction. These
>> visibility rules are defined in different place in the documentation
>> and don't depend on transaction isolation level.
>>
>> So returning to my example "statement-level read consistency" means
>> that cursor can see myfield=2 if update is done in another transaction
>> before cursor is opened but after begin is executed.
>
> Wait a minute. If "statement-level read consistency" only applies to two 
> queries in different transactions, what bearing, if any, does it have on your 
> example of "open, fetch, update, fetch"? There, everything happens in the 
> same transaction. I'm thoroughly confused.

I'm sorry, I made that example before I carefully re-read Petite's
email and understood what you are concerned about. Plus I was taking
your example as a base for mine. :)
But for statements inside one transaction Oracle uses the same rules
as in statement-level consistency too. Although it's probably named a
little bit differently and its definition doesn't include "committed
data" (it would be "finished statements" or something like that).

Pavel
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to