1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Add assert() statements to help verify the overflow page cache.

FossilOrigin-Name: 0ebc65481f4a3e7974558adea51c620a025bc0e76c0a139e549b56c5abe0cabb
This commit is contained in:
drh
2024-04-12 13:05:36 +00:00
parent ae7ede4a4f
commit 1d40237bc8
3 changed files with 11 additions and 7 deletions

View File

@@ -5143,6 +5143,10 @@ static int accessPayload(
memset(pCur->aOverflow, 0, nOvfl*sizeof(Pgno));
pCur->curFlags |= BTCF_ValidOvfl;
}else{
/* Sanity check the validity of the overflow page cache */
assert( pCur->aOverflow[0]==nextPage || pCur->aOverflow[0]==0 );
assert( pCur->aOverflow[0]!=0 || pCur->aOverflow[offset/ovflSize]==0 );
/* If the overflow page-list cache has been allocated and the
** entry for the first required overflow page is valid, skip
** directly to it.