>> For example, say you have two databases in a transaction - mine.db >> and yours.db. A crash happens while committing the transaction >> and the file mine.db-mjMASTER is left in the file-system. >> >> Following recovery, if a process tries to read mine.db, the >> transaction on mine.db will be rolled back. But the master >> journal file cannot be deleted yet (since the interrupted >> transaction on yours.db has not yet been reverted). >> >> If the process then attaches "ours.db" and then tries to >> write a multi-file transaction that involves mine.db and >> ours.db it has a problem - it wants to create and populate >> mine.db-mjMASTER but it cannot, since that file is still >> in use. >> >> We use the random names to get around this problem. >> You could probably get away with using "-mjMASTER1", >> "-mjMASTER2" etc. if you wanted to. See the loop around >> line 1729 of vdbeaux.c. >> > > We have 2 databases. We open one and attach the other one to it at the > very beginning of our single (multi-threaded) database process. > Subsequently, we starting issuing SQL statements that could affect > either one or both databases. It seems we could get by with a single > master-journal filename. Do you agree?
Probably. Sounds Ok in theory. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users