mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Modify the code for reading hot-journal files so that it can handle journals generated by versions 3.5.7 and earlier.
FossilOrigin-Name: b9170f2903c480bca2bdc986e98aaeadfdb9ad2b
This commit is contained in:
@@ -1509,6 +1509,14 @@ static int readJournalHdr(
|
||||
return rc;
|
||||
}
|
||||
|
||||
/* Versions of SQLite prior to 3.5.8 set the page-size field of the
|
||||
** journal header to zero. In this case, assume that the Pager.pageSize
|
||||
** variable is already set to the correct page size.
|
||||
*/
|
||||
if( iPageSize==0 ){
|
||||
iPageSize = pPager->pageSize;
|
||||
}
|
||||
|
||||
/* Check that the values read from the page-size and sector-size fields
|
||||
** are within range. To be 'in range', both values need to be a power
|
||||
** of two greater than or equal to 512 or 32, and not greater than their
|
||||
|
Reference in New Issue
Block a user