mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
When populating an index b-tree as part of a CREATE INDEX or REINDEX statement, distribute cells between up to three siblings in balance_nonroot() instead of four. This produces identical database files, but is slightly faster.
FossilOrigin-Name: b0d31e779ecf01c5a235443c05f488b177ac3045
This commit is contained in:
@@ -5991,18 +5991,19 @@ static int balance_nonroot(
|
||||
i = pParent->nOverflow + pParent->nCell;
|
||||
if( i<2 ){
|
||||
nxDiv = 0;
|
||||
nOld = i+1;
|
||||
}else{
|
||||
nOld = 3;
|
||||
assert( bBulk==0 || bBulk==1 );
|
||||
if( iParentIdx==0 ){
|
||||
nxDiv = 0;
|
||||
}else if( iParentIdx==i ){
|
||||
nxDiv = i-2;
|
||||
nxDiv = i-2+bBulk;
|
||||
}else{
|
||||
assert( bBulk==0 );
|
||||
nxDiv = iParentIdx-1;
|
||||
}
|
||||
i = 2;
|
||||
i = 2-bBulk;
|
||||
}
|
||||
nOld = i+1;
|
||||
if( (i+nxDiv-pParent->nOverflow)==pParent->nCell ){
|
||||
pRight = &pParent->aData[pParent->hdrOffset+8];
|
||||
}else{
|
||||
|
Reference in New Issue
Block a user