On Aug 11, 2010, at 1:25 AM, David Barrett wrote: > On 08/08/2010 10:00 PM, Dan Kennedy wrote: >> >> On Aug 9, 2010, at 11:17 AM, David Barrett wrote: >>> 3) When an application performs read/write queries on the database >>> in >>> parallel to the .backup command being run on the database, will the >>> application occasionally get the SQLITE_LOCKED return value to the >>> sqlite3_exec() command? I think the answer is "yes". >> >> The answer to (3) would be "No." with a WAL mode database. > > Ah, got it. But to clarify, it will occasionally get SQLITE_BUSY if > non-WAL, right? Thanks!
Yes. When you backup a database, your backup process is a database reader. In WAL mode, a database reader will block neither another reader or a writer. So no chance of the application getting an SQLITE_BUSY. In non-WAL (rollback) mode, a database reader will block a writer. So if the app tries to write while the shell is running the ".backup" command, it may get SQLITE_BUSY. > > -david > _______________________________________________ > sqlite-users mailing list > [email protected] > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

