提交 71c8b910 编写于 作者: H Hongze Cheng

more

上级 ba4b33e7
......@@ -312,7 +312,8 @@ static int tdbBtreeOpenImpl(SBTree *pBt) {
return -1;
}
// TODO: Unref the page
// TODO: here still has problem
tdbPagerReturnPage(pBt->pPager, pPage);
ASSERT(pgno != 0);
pBt->root = pgno;
......@@ -763,6 +764,15 @@ static int tdbBtreeBalanceNonRoot(SBTree *pBt, SPage *pParent, int idx) {
}
}
// TODO: here is not corrent for drop case
for (int i = 0; i < nNews; i++) {
if (i < nOlds) {
tdbPagerReturnPage(pBt->pPager, pOlds[i]);
} else {
tdbPagerReturnPage(pBt->pPager, pNews[i]);
}
}
return 0;
}
......@@ -814,6 +824,8 @@ static int tdbBtreeBalance(SBTC *pBtc) {
return -1;
}
tdbPagerReturnPage(pBtc->pBt->pPager, pBtc->pPage);
pBtc->iPage--;
pBtc->pPage = pBtc->pgStack[pBtc->iPage];
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册