diff options
author | drh <> | 2024-04-12 13:05:36 +0000 |
---|---|---|
committer | drh <> | 2024-04-12 13:05:36 +0000 |
commit | 1d40237bc8b1c6ec71dfe763329e1aceacf022fa (patch) | |
tree | a4e16fb57332c564db6c3c5341de52ba9cb71d2c /src | |
parent | ae7ede4a4f70648170b05d176b877f97734d1383 (diff) | |
download | sqlite-1d40237bc8b1c6ec71dfe763329e1aceacf022fa.tar.gz sqlite-1d40237bc8b1c6ec71dfe763329e1aceacf022fa.zip |
Add assert() statements to help verify the overflow page cache.
FossilOrigin-Name: 0ebc65481f4a3e7974558adea51c620a025bc0e76c0a139e549b56c5abe0cabb
Diffstat (limited to 'src')
-rw-r--r-- | src/btree.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/btree.c b/src/btree.c index 91c9e4fb5..756ec942c 100644 --- a/src/btree.c +++ b/src/btree.c @@ -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. |