1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-16 23:02:26 +03:00

Small tweak to the btree balancer for improved tree balance.

FossilOrigin-Name: 8817dedb75430e6c78ff527f7ded4abb35776cef
This commit is contained in:
drh
2016-07-23 19:18:55 +00:00
3 changed files with 9 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;