1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

When building a b-tree as part of a CREATE INDEX or REINDEX statement, attempt to pack keys into pages as tightly as possible.

FossilOrigin-Name: efea62b96c6a242c8ac2bdad70e50c87aee5e871
This commit is contained in:
dan
2012-08-08 11:55:15 +00:00
parent acf239b589
commit f64cc49962
3 changed files with 10 additions and 8 deletions

View File

@@ -6211,7 +6211,9 @@ static int balance_nonroot(
d = r + 1 - leafData;
assert( d<nMaxCells );
assert( r<nMaxCells );
while( szRight==0 || szRight+szCell[d]+2<=szLeft-(szCell[r]+2) ){
while( szRight==0
|| (!bBulk && szRight+szCell[d]+2<=szLeft-(szCell[r]+2))
){
szRight += szCell[d] + 2;
szLeft -= szCell[r] + 2;
cntNew[i-1]--;