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

Very small simplification to the btree balancer.

FossilOrigin-Name: f421adf54c9db91ba6ca64a8ba3751680e47924a
This commit is contained in:
drh
2016-01-20 01:32:00 +00:00
parent e40cf40c1a
commit 36b78ee7d8
3 changed files with 8 additions and 9 deletions

View File

@@ -7186,9 +7186,8 @@ static int balance_nonroot(
** long be able to find the cells if a pointer to each cell is not saved
** first.
*/
memset(&b.szCell[b.nCell], 0, sizeof(b.szCell[0])*limit);
memset(&b.szCell[b.nCell], 0, sizeof(b.szCell[0])*(limit+pOld->nOverflow));
if( pOld->nOverflow>0 ){
memset(&b.szCell[b.nCell+limit], 0, sizeof(b.szCell[0])*pOld->nOverflow);
limit = pOld->aiOvfl[0];
for(j=0; j<limit; j++){
b.apCell[b.nCell] = aData + (maskPage & get2byteAligned(piCell));