more TDB
This commit is contained in:
parent
b6d27d3759
commit
493670d2f0
|
@ -482,9 +482,11 @@ static int tdbBtreeBalanceDeeper(SBTree *pBt, SPage *pRoot, SPage **ppChild) {
|
|||
u8 flags;
|
||||
SIntHdr *pIntHdr;
|
||||
SBtreeInitPageArg zArg;
|
||||
u8 leaf;
|
||||
|
||||
pPager = pRoot->pPager;
|
||||
flags = TDB_BTREE_PAGE_GET_FLAGS(pRoot);
|
||||
leaf = TDB_BTREE_PAGE_IS_LEAF(flags);
|
||||
|
||||
// Allocate a new child page
|
||||
zArg.flags = TDB_FLAG_REMOVE(flags, TDB_BTREE_ROOT);
|
||||
|
@ -494,6 +496,10 @@ static int tdbBtreeBalanceDeeper(SBTree *pBt, SPage *pRoot, SPage **ppChild) {
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (!leaf) {
|
||||
((SIntHdr *)pChild->pData)->pgno = ((SIntHdr *)(pRoot->pData))->pgno;
|
||||
}
|
||||
|
||||
// Copy the root page content to the child page
|
||||
tdbPageCopy(pRoot, pChild);
|
||||
|
||||
|
|
Loading…
Reference in New Issue