more TDB
This commit is contained in:
parent
b8954ae1c5
commit
2e6f7f15d5
|
@ -482,12 +482,6 @@ static int tdbBtreeBalanceDeeper(SBTree *pBt, SPage *pRoot, SPage **ppChild) {
|
|||
// Copy the root page content to the child page
|
||||
tdbPageCopy(pRoot, pChild);
|
||||
|
||||
pChild->nOverflow = pRoot->nOverflow;
|
||||
for (int i = 0; i < pChild->nOverflow; i++) {
|
||||
pChild->apOvfl[i] = pRoot->apOvfl[i];
|
||||
pChild->aiOvfl[i] = pRoot->aiOvfl[i];
|
||||
}
|
||||
|
||||
// Reinitialize the root page
|
||||
zArg.flags = TDB_BTREE_ROOT;
|
||||
zArg.pBt = pBt;
|
||||
|
|
|
@ -226,7 +226,12 @@ void tdbPageCopy(SPage *pFromPage, SPage *pToPage) {
|
|||
TDB_PAGE_NFREE_SET(pToPage, nFree - delta);
|
||||
}
|
||||
|
||||
// TODO: do we need to copy the overflow part ???
|
||||
// Copy the overflow cells
|
||||
for (int iOvfl = 0; iOvfl < pFromPage->nOverflow; iOvfl++) {
|
||||
pToPage->aiOvfl[iOvfl] = pFromPage->aiOvfl[iOvfl];
|
||||
pToPage->apOvfl[iOvfl] = pFromPage->apOvfl[iOvfl];
|
||||
}
|
||||
pToPage->nOverflow = pFromPage->nOverflow;
|
||||
}
|
||||
|
||||
static int tdbPageAllocate(SPage *pPage, int szCell, SCell **ppCell) {
|
||||
|
|
Loading…
Reference in New Issue