>I am using multiple threads, but in this instance just 2 inside of one >process. I do not change any PRAGMA settings other than user_version and >journal_mode. The two >connections differ only by the fact that one is read >only and one is read-write. It’s possible that I’ve forgotten a finalize >somewhere, etc, but unlikely because that stuff gets >processed in a pretty >centralized way when the object holding the sqlite3 object is disposed (C# >term). > >But in the end, my original understanding should hold that after the COMMIT >execution finishes all data should be immediately visible to other connections >from that point >forward? >
No. After COMMIT finishes, any TRANSACTION that is STARTED LATER willl see the new data. Reading "stale" data (i.e. the DB state at the beginning of a transaction) is at least almost always caused by indvertently leaving a transaction open. Setting the journal mode to WAL hides this problem, because the writer is no longer blocked by the reader's transaction. Disable WAL mode and you will probably find that the writer will find that the "database is locked". When this occurs, you can use then sqlite3_next_stmt() interface (on the readonly connection) to locate any unfinished statements. If these are prepared via sqlite3_prepare_V2, you can retrieve the SQL using sqlite3_sql(). ___________________________________________ Gunter Hick Software Engineer Scientific Games International GmbH FN 157284 a, HG Wien Klitschgasse 2-4, A-1130 Vienna, Austria Tel: +43 1 80100 0 E-Mail: h...@scigames.at This communication (including any attachments) is intended for the use of the intended recipient(s) only and may contain information that is confidential, privileged or legally protected. Any unauthorized use or dissemination of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender by return e-mail message and delete all copies of the original communication. Thank you for your cooperation. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users