未验证 提交 9d8b0264 编写于 作者: H Hongze Cheng 提交者: GitHub

Merge pull request #17525 from taosdata/fix/TS-1889

fix(tdb): typo casues large page crash
...@@ -371,7 +371,7 @@ static int tdbDefaultKeyCmprFn(const void *pKey1, int keyLen1, const void *pKey2 ...@@ -371,7 +371,7 @@ static int tdbDefaultKeyCmprFn(const void *pKey1, int keyLen1, const void *pKey2
} }
return cret; return cret;
} }
/*
static int tdbBtreeOpenImpl(SBTree *pBt) { static int tdbBtreeOpenImpl(SBTree *pBt) {
// Try to get the root page of the an existing btree // Try to get the root page of the an existing btree
SPgno pgno; SPgno pgno;
...@@ -400,7 +400,7 @@ static int tdbBtreeOpenImpl(SBTree *pBt) { ...@@ -400,7 +400,7 @@ static int tdbBtreeOpenImpl(SBTree *pBt) {
pBt->root = pgno; pBt->root = pgno;
return 0; return 0;
} }
*/
int tdbBtreeInitPage(SPage *pPage, void *arg, int init) { int tdbBtreeInitPage(SPage *pPage, void *arg, int init) {
SBTree *pBt; SBTree *pBt;
u8 flags; u8 flags;
......
...@@ -586,7 +586,7 @@ static inline void setLPageNFree(SPage *pPage, int nFree) { ...@@ -586,7 +586,7 @@ static inline void setLPageNFree(SPage *pPage, int nFree) {
// cell offset // cell offset
static inline int getLPageCellOffset(SPage *pPage, int idx) { 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); return TDB_GET_U24(pPage->pCellIdx + 3 * idx);
} }
......
...@@ -116,7 +116,7 @@ int tdbPagerClose(SPager *pPager) { ...@@ -116,7 +116,7 @@ int tdbPagerClose(SPager *pPager) {
} }
return 0; return 0;
} }
/*
int tdbPagerOpenDB(SPager *pPager, SPgno *ppgno, bool toCreate, SBTree *pBt) { int tdbPagerOpenDB(SPager *pPager, SPgno *ppgno, bool toCreate, SBTree *pBt) {
SPgno pgno; SPgno pgno;
SPage *pPage; SPage *pPage;
...@@ -167,7 +167,7 @@ int tdbPagerOpenDB(SPager *pPager, SPgno *ppgno, bool toCreate, SBTree *pBt) { ...@@ -167,7 +167,7 @@ int tdbPagerOpenDB(SPager *pPager, SPgno *ppgno, bool toCreate, SBTree *pBt) {
*ppgno = pgno; *ppgno = pgno;
return 0; return 0;
} }
*/
int tdbPagerWrite(SPager *pPager, SPage *pPage) { int tdbPagerWrite(SPager *pPager, SPage *pPage) {
int ret; int ret;
SPage **ppPage; SPage **ppPage;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册