logo       

Re: Database is locked error on 2nd conn: msg#00041

python.db.pysqlite.user

Subject: Re: Database is locked error on 2nd conn

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ed Pasma wrote:
> Gerhard Häring wrote:
>> David Pratt wrote:
>>
>>> [...] In posgres and psycopg I am using an isolation level of
>>> serializable. What is equivalent for SQLite? I have not specified an
>>> isolation on my connection, does this mean an isolation level of
>>> none?
>>
>> pysqlite's default setting for isolation level is "DEFERRED". I can't
>> say how it compares to PostgreSQL's isolation levels, but I think
>> that they work differently.

> A ha, so with regard to the isolation_level parameter, "DEFERRED" is
> the same as "" (empty string)? The latter is the initial value.

Yes, because pysqlite's isolation level ends up as %s in the "BEGIN %s"
statements that are created. And a simple "BEGIN" is the same for SQLite as
"BEGIN DEFERRED". IOW "DEFERRED" is SQLite's default.

isolation level None OTOH suppresses creating implicit BEGIN statements in
pysqlite in order to implement autocommit mode.

- -- Gerhard
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFEXdRddIO4ozGCH14RAlG5AJ9xCha0MPXibHXwnLx5qdw6GXX67gCeM/Yy
ZNLXniouCKMqT3Vtz1tnEMs=
=/Y8+
-----END PGP SIGNATURE-----


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise