This commit is contained in:
Hongze Cheng 2022-03-23 09:03:01 +00:00
parent 2bb84eeb2b
commit 1fba9d5d3d
1 changed files with 7 additions and 3 deletions

View File

@ -735,9 +735,11 @@ static int tdbBtreeBalanceNonRoot(SBTree *pBt, SPage *pParent, int idx) {
// move to next new page // move to next new page
iNew++; iNew++;
nNews = 0; nNewCells = 0;
if (iNew < nNews) {
tdbBtreeZeroPage(pNews[iNew], &iarg); tdbBtreeZeroPage(pNews[iNew], &iarg);
} }
}
} else { } else {
ASSERT(0); ASSERT(0);
ASSERT(childNotLeaf); ASSERT(childNotLeaf);
@ -753,10 +755,12 @@ static int tdbBtreeBalanceNonRoot(SBTree *pBt, SPage *pParent, int idx) {
// move to next new page // move to next new page
iNew++; iNew++;
nNewCells = 0; nNewCells = 0;
if (iNew < nNews) {
tdbBtreeZeroPage(pNews[iNew], &iarg); tdbBtreeZeroPage(pNews[iNew], &iarg);
} }
} }
} }
}
for (int i = 0; i < nOlds; i++) { for (int i = 0; i < nOlds; i++) {
tdbPageDestroy(pOldsCopy[i], NULL, NULL); tdbPageDestroy(pOldsCopy[i], NULL, NULL);