On Fri, Jan 21, 2011 at 9:18 PM, Artur Reilin <sql...@yuedream.de> 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 hash key
> doesn't match, the journal will not be used.
>

So what if your system crashes (due to a power failure, for example) just as
it is writing the page that contains the hash or token in the database file,
such that the hash or token (along with the rest of that page) is corrupted?
 Then when power is restored, instead of repairing the damage using the
journal, SQLite would discard the journal and leave the database corrupted?

An how would you write the hash or token into the database file in the first
place?  You have to create a journal file before you make any changes to the
database, to provide for recovery following a crash.  But if you can't
create the journal without first writing the hash/token, then you are
deadlocked.




> _______________________________________________
> 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

Reply via email to