mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Patch makes balance_nonroot() slightly smaller and faster and more robust
against corrupt databases. FossilOrigin-Name: 174da3c32c9caebd642c31cb594597ccd5bb2a7fc501b1f49aef0b7b4765bfca
This commit is contained in:
@@ -7152,8 +7152,9 @@ static int editPage(
|
||||
int iCell = (iOld + pPg->aiOvfl[i]) - iNew;
|
||||
if( iCell>=0 && iCell<nNew ){
|
||||
pCellptr = &pPg->aCellIdx[iCell * 2];
|
||||
assert( nCell>=iCell );
|
||||
memmove(&pCellptr[2], pCellptr, (nCell - iCell) * 2);
|
||||
if( nCell>iCell ){
|
||||
memmove(&pCellptr[2], pCellptr, (nCell - iCell) * 2);
|
||||
}
|
||||
nCell++;
|
||||
if( pageInsertArray(
|
||||
pPg, pBegin, &pData, pCellptr,
|
||||
|
Reference in New Issue
Block a user