On 2/7/18, Deon Brewis <de...@outlook.com> wrote:
> I don't think SQLITE verifies the memory during every write. There's a:
> if( memcmp(page1, zMagicHeader, 16)!=0 ){
> during lockBtree() but that seems to be on read, not write.
> Is there somewhere I can add a check of the header buffer before the write
> to disk?

There does not appear to be a single place to put this code as the
header can be written from several places.

Search for instances of "sqlite3OsWrite(pPager->fd, ...)".  You want
to be sure that the last field is "fd" and not "jfd" or "sjfd".  I
think there are four separate places you will need to insert your

D. Richard Hipp
sqlite-users mailing list

Reply via email to