This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ghaering
Recipients amaury.forgeotdarc, ghaering
Date 2008-09-12.14:58:31
SpamBayes Score 1.3065438e-05
Marked as misclassified No
Message-id <1221231513.06.0.476097302687.issue3846@psf.upfronthosting.co.za>
In-reply-to
Content
1. SQLite calling back

Good that you mention it. During sqlite3_prepare, SQLite can call the
authorizer_callback. Fortunately, it already acquires/releases the GIL
appropriately already.

2. Other thread closing connection, etc.

Connections/cursors cannot be shared among Python threads. Well, with
newer SQLite releases I think it is possible. But we have checks in
place that raise an error if you do it. These are the various calls to
pysqilte_check_thread in the code. If the table is dropped,
sqlite3_prepare will just raise an error about the statement not being
valid.

If, however, the table is dropped between sqlite3_prepare and
sqlite3_step, then the SQLITE_SCHEMA error code is returned. We then try
to recompile the statement (it might have just been an ALTER TABLE and
the statement is valid after compiling it again). If that still fails,
we promote the error to Python (cursor.c lines 605ff).
History
Date User Action Args
2008-09-12 14:58:33ghaeringsetrecipients: + ghaering, amaury.forgeotdarc
2008-09-12 14:58:33ghaeringsetmessageid: <1221231513.06.0.476097302687.issue3846@psf.upfronthosting.co.za>
2008-09-12 14:58:32ghaeringlinkissue3846 messages
2008-09-12 14:58:31ghaeringcreate