Olivier Vidal wrote:
> UPDATE
> Internally, is the same thing that: BEGIN DEFERRED - UPDATE -COMMIT?

Yes.

> SELECT
> UPDATE
> In this example, the set of these commands is serialized?

Assuming that you finalize the SELECT before executing the UPDATE, this
is the same as BEGIN SELECT COMMIT BEGIN UPDATE COMMIT.

An automatically started transaction is closed when last active query
finishes (see <http://www.sqlite.org/lang_transaction.html>).  So if you
keep the SELECT cursor open, you'd get BEGIN SELECT UPDATE COMMIT.

> BEGIN IMMEDIATE
> SELECT
> UPDATE
> COMMIT
> I'm sure that the data can not be modified (between BEGIN IMMEDIATE
> and COMMIT) by another thread/proces?

There can never be more than one writer.  An IMMEDIATE transaction
counts as a writer.


Regards,
Clemens

Reply via email to