On Wed, Jan 12, 2011 at 5:27 AM, Max Vlasov <max.vla...@gmail.com> wrote:
> On Thu, Dec 23, 2010 at 3:10 PM, Max Vlasov <max.vla...@gmail.com> wrote: > > > Hi, > > I experimented with artificial power loss (using hd box) and 3.7.4 both > > library and shell didn't restore the files to the initial state. 3.6.10 > > restores successfully. > > > > > This is a kind of repost, there wasn't any answer for my initial one. > Please > let me know is this bug or not a bug, I can't sleep without knowing the > truth :) > I suppose it would be a nice-to-have if SQLite were more aggressive about deleting stale journal files. But it is not a serious problem. There is no danger of database corruption here, or anything like that. The journal file is "stale". It is not a "hot journal". And it won't (and can't) be rolled back. It's just a junk file that got left around. It will get cleaned up on the next write transaction. I guess you are asking for an enhancement for it to be cleaned up on the next read transaction. So even though this is not currently a problem, "fixing" it might create real corruptions issues. The deletion of a journal files need to be done with extreme caution, lest they be deleted when they is still hot and hence cause database corruption. It will take us a lot of study and testing to verify that the deletion is "safe". So this is not a simple fix. > > Steps to reproduce without additional test data > > 1. download windows shell 3.7.4 binary > > 2. > > sqlite testdb > > CREATE TABLE [TableOne] ([VALUE] INTEGER); > > .quit > > 3. > > sqlite testdb > > BEGIN TRANSACTION; > > INSERT INTO TableOne (Value) VALUES (123); > > 4. > while still running the shell, "unexpectedly" interrupt the executable with > some external tools (task manager for example) > after this there's a file called testdb-journal near testdb > > 5. > > sqlite testdb > > .quit > > The result: > testdb-journal is still there. > Expected result: > the journal file should be deleted by sqlite. > > Max Vlasov > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- D. Richard Hipp d...@sqlite.org _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users