On Jan 16, 2009, at 6:54 PM, D. Richard Hipp wrote:

>
> On Jan 16, 2009, at 6:43 PM, Noah Hart wrote:
>
>> Just a random thought ... This is new code in pager.c,
>> and if Pager->journalOff  is at the end of the file,
>> then perhaps it could cause his problem.
>>
>>       **
>>       ** To work around this, if the journal file does appear to
>> contain
>>       ** a valid header following Pager.journalOff, then write a 0x00
>>       ** byte to the start of it to prevent it from being recognized.
>>       */
>>       rc = sqlite3OsRead(pPager.jfd, zMagic, 8, jrnlOff);
>>
>
>
> Noah is correct.  There was a bug in my earlier assert statement.   
> The code above reads past the end of the journal file when you are  
> in persistent journaling mode.
>


Note that correct behavior of the xRead method of the VFS in this case  
is to return SQLITE_IOERR_SHORT_READ since it should be reading 0 bytes.

D. Richard Hipp
d...@hwaci.com



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to