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

Minor tweak the the b-tree balancer.

FossilOrigin-Name: d2a0af7a37e390439c3001fedb5834f47fb24a1f
This commit is contained in:
drh
2016-07-14 19:48:08 +00:00
parent 86396219a3
commit 0b4c042b86
3 changed files with 11 additions and 8 deletions

View File

@@ -7340,7 +7340,7 @@ static int balance_nonroot(
assert( r<nMaxCells );
(void)cachedCellSize(&b, r);
if( szRight!=0
&& (bBulk || szRight+b.szCell[d]+2 > szLeft-(b.szCell[r]+2)) ){
&& (bBulk || szRight+b.szCell[d]+2 > szLeft-(b.szCell[r]+(i==k-1?0:2)))){
break;
}
szRight += b.szCell[d] + 2;