diff options
author | drh <drh@noemail.net> | 2016-01-20 01:32:00 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2016-01-20 01:32:00 +0000 |
commit | 36b78ee7d8d23cebaffb3d92da28adbdb94a90d3 (patch) | |
tree | e052a0d72a3bb826e3272024acaa4df17f4ef570 /src/btree.c | |
parent | e40cf40c1a56dfd10b5d16db11135f5f0612a9c4 (diff) | |
download | sqlite-36b78ee7d8d23cebaffb3d92da28adbdb94a90d3.tar.gz sqlite-36b78ee7d8d23cebaffb3d92da28adbdb94a90d3.zip |
Very small simplification to the btree balancer.
FossilOrigin-Name: f421adf54c9db91ba6ca64a8ba3751680e47924a
Diffstat (limited to 'src/btree.c')
-rw-r--r-- | src/btree.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/btree.c b/src/btree.c index eb0808f1d..4e6f6478a 100644 --- a/src/btree.c +++ b/src/btree.c @@ -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)); |