Re: [sqlite] Deleting the sqlite journal file?

2011-01-21 Thread Richard Hipp
On Fri, Jan 21, 2011 at 9:18 PM, Artur Reilin wrote: > > We've thought about that before, but never could come up with a > reasonable > > suggestion. > > > > Something like an hash key in every db and also in a journal, if it is > created, the same key as well. So if the db hash key and journal h

Re: [sqlite] Deleting the sqlite journal file?

2011-01-21 Thread Artur Reilin
> We've thought about that before, but never could come up with a reasonable > suggestion. > Something like an hash key in every db and also in a journal, if it is created, the same key as well. So if the db hash key and journal hash key doesn't match, the journal will not be used. ___

Re: [sqlite] Deleting the sqlite journal file?

2011-01-21 Thread James Berry
Richard, On Jan 21, 2011, at 5:41 PM, Richard Hipp wrote: > On Fri, Jan 21, 2011 at 8:27 PM, James Berry wrote: > >> (1) Is there any API I can/should use to predictably get the name of >> the journal file so that I can delete it, without "knowing" what is should >> be? >> > > The name

Re: [sqlite] Deleting the sqlite journal file?

2011-01-21 Thread Scott Hess
On Fri, Jan 21, 2011 at 5:33 PM, Pavel Ivanov wrote: >>        (2) Are there any changes that can/should be made >> to sqlite3 so that it can identify the bogus journal in this >> scenario and discard it? > > Define the word "bogus". How should SQLite understand that the journal > and the database

Re: [sqlite] Deleting the sqlite journal file?

2011-01-21 Thread Richard Hipp
On Fri, Jan 21, 2011 at 8:27 PM, James Berry wrote: > I ran into an interesting problem today having to do with a left-over > journal file. > > When I first initialize my app, my general strategy is this: > >- Delete src.db, tmp.db, dst.db >- Copy a static copy of my database (src

Re: [sqlite] Deleting the sqlite journal file?

2011-01-21 Thread Simon Slavin
On 22 Jan 2011, at 1:27am, James Berry wrote: > - Delete src.db, tmp.db, dst.db > - Copy a static copy of my database (src.db) to a well-known temporary > place (tmp.db). > - Make some changes to the database (add some indexes, etc) > - If everything has succeeded, copy t

Re: [sqlite] Deleting the sqlite journal file?

2011-01-21 Thread Pavel Ivanov
>        (1) Is there any API I can/should use to predictably get the name of > the journal file so that I can delete it, without "knowing" what is should be? Suffix -journal is hardcoded and won't change in the future to keep compatibility (journals left by any previous version should be read by

[sqlite] Deleting the sqlite journal file?

2011-01-21 Thread James Berry
I ran into an interesting problem today having to do with a left-over journal file. When I first initialize my app, my general strategy is this: - Delete src.db, tmp.db, dst.db - Copy a static copy of my database (src.db) to a well-known temporary place (tmp.db). - Make