From 9d0d5295f40517fd474eea94765301e8baf187e7 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Mon, 2 May 2022 10:13:45 +0000 Subject: [PATCH] more TDB delte --- source/libs/tdb/src/db/tdbBtree.c | 4 +++- source/libs/tdb/src/inc/tdbInt.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/source/libs/tdb/src/db/tdbBtree.c b/source/libs/tdb/src/db/tdbBtree.c index 1d697e0035..887ab10ec0 100644 --- a/source/libs/tdb/src/db/tdbBtree.c +++ b/source/libs/tdb/src/db/tdbBtree.c @@ -1455,13 +1455,15 @@ int tdbBtcDelete(SBTC *pBtc) { } } else { // delete the leaf page and do balance (TODO) + ASSERT(TDB_PAGE_TOTAL_CELLS(pBtc->pPage) == 0); + ASSERT(0); } } return 0; } -int tdbBtcUpsert(SBTC *pBtc) { +int tdbBtcUpsert(SBTC *pBtc, const void *pKey, int kLen, const void *pVal, int vLen) { ASSERT(0); // TODO return 0; diff --git a/source/libs/tdb/src/inc/tdbInt.h b/source/libs/tdb/src/inc/tdbInt.h index d1a1109381..e18952505c 100644 --- a/source/libs/tdb/src/inc/tdbInt.h +++ b/source/libs/tdb/src/inc/tdbInt.h @@ -143,7 +143,7 @@ int tdbBtcMoveToPrev(SBTC *pBtc); int tdbBtreeNext(SBTC *pBtc, void **ppKey, int *kLen, void **ppVal, int *vLen); int tdbBtcGet(SBTC *pBtc, const void **ppKey, int *kLen, const void **ppVal, int *vLen); int tdbBtcDelete(SBTC *pBtc); -int tdbBtcUpsert(SBTC *pBtc); +int tdbBtcUpsert(SBTC *pBtc, const void *pKey, int kLen, const void *pVal, int vLen); // tdbPager.c ==================================== -- GitLab