In case anyone's following along and would care to comment it seems  
like what's happening is:

1. One connection does a DROP TABLE then CREATE TABLE, in back-to-back  
calls to sqlite3_exec.
2. Another connection does a sqlite3_get_table, which calls  
sqlite3_exec, which calls sqlite3_prepare, which calls  
sqlite3LockAndPrepare, which calls sqlite3Prepare, which calls  
schemaIsValid.
3. schemaIsValid compares the db's cookies to the connection's copy of  
those cookies and returns 0 because of the DROP TABLE / CREATE TABLE.
4. sqlite3Prepare calls sqlite3ResetInternalSchema to clear it up for  
next time, and returns the SQLITE_SCHEMA error.
5. The while loop in sqlite3_exec tries once more and so calls  
sqlite3_prepare again.

I would expect it to have succeeded this time, because of the call to  
sqlite3ResetInternalSchema, but perhaps the DROP TABLE is happening  
before the first call and the CREATE TABLE is happening between the  
calls somehow?

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

Reply via email to