fix: TDB upsert no page recycled
This commit is contained in:
parent
2c5ae8011e
commit
175d50594a
|
@ -274,6 +274,7 @@ int tdbBtreeDelete(SBTree *pBt, const void *pKey, int kLen, TXN *pTxn) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
int tdbBtreeUpsert(SBTree *pBt, const void *pKey, int nKey, const void *pData, int nData, TXN *pTxn) {
|
||||
SBTC btc = {0};
|
||||
int c;
|
||||
|
@ -317,6 +318,7 @@ int tdbBtreeUpsert(SBTree *pBt, const void *pKey, int nKey, const void *pData, i
|
|||
tdbBtcClose(&btc);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
int tdbBtreeGet(SBTree *pBt, const void *pKey, int kLen, void **ppVal, int *vLen) {
|
||||
return tdbBtreePGet(pBt, pKey, kLen, NULL, NULL, ppVal, vLen);
|
||||
|
|
|
@ -202,7 +202,8 @@ int tdbTbInsert(TTB *pTb, const void *pKey, int keyLen, const void *pVal, int va
|
|||
int tdbTbDelete(TTB *pTb, const void *pKey, int kLen, TXN *pTxn) { return tdbBtreeDelete(pTb->pBt, pKey, kLen, pTxn); }
|
||||
|
||||
int tdbTbUpsert(TTB *pTb, const void *pKey, int kLen, const void *pVal, int vLen, TXN *pTxn) {
|
||||
return tdbBtreeUpsert(pTb->pBt, pKey, kLen, pVal, vLen, pTxn);
|
||||
tdbTbDelete(pTb, pKey, kLen, pTxn);
|
||||
return tdbTbInsert(pTb, pKey, kLen, pVal, vLen, pTxn);
|
||||
}
|
||||
|
||||
int tdbTbGet(TTB *pTb, const void *pKey, int kLen, void **ppVal, int *vLen) {
|
||||
|
|
|
@ -160,7 +160,7 @@ int tdbBtreeOpen(int keyLen, int valLen, SPager *pFile, char const *tbname, SPgn
|
|||
int tdbBtreeClose(SBTree *pBt);
|
||||
int tdbBtreeInsert(SBTree *pBt, const void *pKey, int kLen, const void *pVal, int vLen, TXN *pTxn);
|
||||
int tdbBtreeDelete(SBTree *pBt, const void *pKey, int kLen, TXN *pTxn);
|
||||
int tdbBtreeUpsert(SBTree *pBt, const void *pKey, int nKey, const void *pData, int nData, TXN *pTxn);
|
||||
// int tdbBtreeUpsert(SBTree *pBt, const void *pKey, int nKey, const void *pData, int nData, TXN *pTxn);
|
||||
int tdbBtreeGet(SBTree *pBt, const void *pKey, int kLen, void **ppVal, int *vLen);
|
||||
int tdbBtreePGet(SBTree *pBt, const void *pKey, int kLen, void **ppKey, int *pkLen, void **ppVal, int *vLen);
|
||||
|
||||
|
|
Loading…
Reference in New Issue