fix(tdb): typo casues large page crash
This commit is contained in:
parent
95dbfd4813
commit
16275caa8d
|
@ -371,7 +371,7 @@ static int tdbDefaultKeyCmprFn(const void *pKey1, int keyLen1, const void *pKey2
|
|||
}
|
||||
return cret;
|
||||
}
|
||||
|
||||
/*
|
||||
static int tdbBtreeOpenImpl(SBTree *pBt) {
|
||||
// Try to get the root page of the an existing btree
|
||||
SPgno pgno;
|
||||
|
@ -400,7 +400,7 @@ static int tdbBtreeOpenImpl(SBTree *pBt) {
|
|||
pBt->root = pgno;
|
||||
return 0;
|
||||
}
|
||||
|
||||
*/
|
||||
int tdbBtreeInitPage(SPage *pPage, void *arg, int init) {
|
||||
SBTree *pBt;
|
||||
u8 flags;
|
||||
|
|
|
@ -586,7 +586,7 @@ static inline void setLPageNFree(SPage *pPage, int nFree) {
|
|||
|
||||
// cell offset
|
||||
static inline int getLPageCellOffset(SPage *pPage, int idx) {
|
||||
ASSERT(idx >= 0 && idx < getPageCellNum(pPage));
|
||||
ASSERT(idx >= 0 && idx < getLPageCellNum(pPage));
|
||||
return TDB_GET_U24(pPage->pCellIdx + 3 * idx);
|
||||
}
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ int tdbPagerClose(SPager *pPager) {
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
int tdbPagerOpenDB(SPager *pPager, SPgno *ppgno, bool toCreate, SBTree *pBt) {
|
||||
SPgno pgno;
|
||||
SPage *pPage;
|
||||
|
@ -167,7 +167,7 @@ int tdbPagerOpenDB(SPager *pPager, SPgno *ppgno, bool toCreate, SBTree *pBt) {
|
|||
*ppgno = pgno;
|
||||
return 0;
|
||||
}
|
||||
|
||||
*/
|
||||
int tdbPagerWrite(SPager *pPager, SPage *pPage) {
|
||||
int ret;
|
||||
SPage **ppPage;
|
||||
|
|
Loading…
Reference in New Issue