Robert Lehr <[EMAIL PROTECTED]> wrote: > I have a question about recovering from a transaction that was not > completed by a process b/c it terminated abnormally, e.g., careless > SIGKILL or segfault. The scenario involves multiple processes having > the database open. > > * process A opens the database > * process B opens the database > * process A starts a transaction > * process A terminates abnormally BEFORE completing the > transaction > * process B starts a transaction > > the database is now in an indeterminate state. what happens in > process B?
http://sqlite.org/atomiccommit.html When B starts a transaction, it notices a "hot" rollback journal left behind by process A. It then uses this journal to undo (roll back) any changes process A may have made in the database file but haven't committed. The database is restored to the state it was in before process A started its transaction. Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users