Gerhard Häring <[EMAIL PROTECTED]> added the comment: 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). _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3846> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com