1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Size reduction and performance increase in the freeSpace() routine of btree.c.

FossilOrigin-Name: 7d7aed053f600659c63d8bac6d5da77879936c3fc57bfd058a4943b3bc530575
This commit is contained in:
drh
2022-07-07 20:11:35 +00:00
parent 07fae32db0
commit dce232a298
3 changed files with 9 additions and 9 deletions

View File

@@ -1827,7 +1827,7 @@ static int freeSpace(MemPage *pPage, u16 iStart, u16 iSize){
iFreeBlk = 0; /* Shortcut for the case when the freelist is empty */
}else{
while( (iFreeBlk = get2byte(&data[iPtr]))<iStart ){
if( iFreeBlk<iPtr+4 ){
if( iFreeBlk<=iPtr ){
if( iFreeBlk==0 ) break; /* TH3: corrupt082.100 */
return SQLITE_CORRUPT_PAGE(pPage);
}