Message73092
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). |
|
Date |
User |
Action |
Args |
2008-09-12 14:58:33 | ghaering | set | recipients:
+ ghaering, amaury.forgeotdarc |
2008-09-12 14:58:33 | ghaering | set | messageid: <1221231513.06.0.476097302687.issue3846@psf.upfronthosting.co.za> |
2008-09-12 14:58:32 | ghaering | link | issue3846 messages |
2008-09-12 14:58:31 | ghaering | create | |
|