Dear all and SQLite Developers,

About:  https://www.sqlite.org/lang_savepoint.html

"The SAVEPOINT command starts a new transaction with a name. The transaction 
names need not be unique. A SAVEPOINT can be started either within or outside 
of a BEGIN...COMMIT.  When a SAVEPOINT is the outer-most savepoint and it is 
not within a BEGIN...COMMIT then the behavior is the same as BEGIN DEFERRED 
TRANSACTION."

What are the specific reasons for SAVEPOINT to be limited to BEGIN DEFERRED in 
that case?
Could an optional syntax extension allow to specify IMMEDIATE (and maybe 
EXCLUSIVE)?

SAVEPOINT savepoint-name [DEFERRED|IMMEDIATE|EXCLUSIVE] (with DEFERRED the 
default)?

When a "SAVEPOINT name [DEFERRED|IMMEDIATE|EXCLUSIVE]" is the outer-most 
savepoint and it is not within a BEGIN...COMMIT then the behavior is the same 
as BEGIN DEFERRED|IMMEDIATE|EXCLUSIVE TRANSACTION.

In all other cases, the behavior will keep or upgrade the locks when required 
and permitted, or fail (SQLITE_BUSY I think).

I suppose if it wasn't part of SAVEPOINT behaviors at first, it's because there 
are (unsuspected by me) complex/challenging hidden issues (code 
size/complexity) or maybe it slips too far away from whatever standard?

-- 
Best Regards, Meilleures salutations, Met vriendelijke groeten,
Olivier Mascia, http://integral.software


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

Reply via email to