Hi all, I'm having real problems with locked sqlite journal files.
(Win32, V 3.6.23.1). Very occasionaly, a commit fails with extended error code SQLITE_IOERR_DELETE | SQLITE_IOERR. It seems that the most likely cause is another application locking the file at that point (e.g. virus checker). Although it's surprising that this would happen (as the journal file is in a hidden system directory (e.g. C:\users\john\AppData\Local\MyApp)) I guess badly behaved apps may well briefly open and lock recently changed files. (As an aside, this is clearly an issue the sqlite team have tried to address, as in winDelete() you can see it retries several times, and there is a comment which refers to virus checkers). So anyway, instead I switched to using TRUNCATE journal mode instead. But, I'm just getting the same issue. This time the extended error code is SQLITE_IOERR_TRUNCATE | SQLITE_IOERR. So, on some user's machines, very occasionaly SOMETHING is locking the journal file. My question is this: is there a way to make sqlite open the journal file in a locked manner, and keep the lock in effect while it's using it? That way, any naughty app would just not be able to open read handles. (This is certainly possible in Win32: you can specify what share mode you require when opening a file handle). Any ideas? John _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users