Merge pull request #27066 from taosdata/fix/TD-31285-3.0
fix: handle error code
This commit is contained in:
commit
7eda50065d
|
@ -355,7 +355,9 @@ _query:
|
||||||
|
|
||||||
version = ((SUidIdxVal *)pData)[0].version;
|
version = ((SUidIdxVal *)pData)[0].version;
|
||||||
|
|
||||||
(void)tdbTbGet(pMeta->pTbDb, &(STbDbKey){.uid = uid, .version = version}, sizeof(STbDbKey), &pData, &nData);
|
if (tdbTbGet(pMeta->pTbDb, &(STbDbKey){.uid = uid, .version = version}, sizeof(STbDbKey), &pData, &nData) != 0) {
|
||||||
|
goto _err;
|
||||||
|
}
|
||||||
|
|
||||||
SMetaEntry me = {0};
|
SMetaEntry me = {0};
|
||||||
tDecoderInit(&dc, pData, nData);
|
tDecoderInit(&dc, pData, nData);
|
||||||
|
@ -385,7 +387,9 @@ _query:
|
||||||
}
|
}
|
||||||
|
|
||||||
tDecoderInit(&dc, pData, nData);
|
tDecoderInit(&dc, pData, nData);
|
||||||
(void)tDecodeSSchemaWrapperEx(&dc, &schema);
|
if (tDecodeSSchemaWrapperEx(&dc, &schema) != 0) {
|
||||||
|
goto _err;
|
||||||
|
}
|
||||||
pSchema = tCloneSSchemaWrapper(&schema);
|
pSchema = tCloneSSchemaWrapper(&schema);
|
||||||
tDecoderClear(&dc);
|
tDecoderClear(&dc);
|
||||||
|
|
||||||
|
|
|
@ -194,7 +194,11 @@ int tdbBtreeInsert(SBTree *pBt, const void *pKey, int kLen, const void *pVal, in
|
||||||
int idx;
|
int idx;
|
||||||
int c;
|
int c;
|
||||||
|
|
||||||
(void)tdbBtcOpen(&btc, pBt, pTxn);
|
ret = tdbBtcOpen(&btc, pBt, pTxn);
|
||||||
|
if (ret) {
|
||||||
|
tdbError("tdb/btree-insert: btc open failed with ret: %d.", ret);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
tdbTrace("tdb insert, btc: %p, pTxn: %p", &btc, pTxn);
|
tdbTrace("tdb insert, btc: %p, pTxn: %p", &btc, pTxn);
|
||||||
|
|
||||||
|
@ -235,7 +239,11 @@ int tdbBtreeDelete(SBTree *pBt, const void *pKey, int kLen, TXN *pTxn) {
|
||||||
int c;
|
int c;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
(void)tdbBtcOpen(&btc, pBt, pTxn);
|
ret = tdbBtcOpen(&btc, pBt, pTxn);
|
||||||
|
if (ret) {
|
||||||
|
tdbError("tdb/btree-delete: btc open failed with ret: %d.", ret);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
btc.coder.ofps = taosArrayInit(8, sizeof(SPage *));
|
btc.coder.ofps = taosArrayInit(8, sizeof(SPage *));
|
||||||
// btc.coder.ofps = taosArrayInit(8, sizeof(SPgno));
|
// btc.coder.ofps = taosArrayInit(8, sizeof(SPgno));
|
||||||
|
@ -337,7 +345,11 @@ int tdbBtreePGet(SBTree *pBt, const void *pKey, int kLen, void **ppKey, int *pkL
|
||||||
void *pTVal = NULL;
|
void *pTVal = NULL;
|
||||||
SCellDecoder cd = {0};
|
SCellDecoder cd = {0};
|
||||||
|
|
||||||
(void)tdbBtcOpen(&btc, pBt, NULL);
|
ret = tdbBtcOpen(&btc, pBt, NULL);
|
||||||
|
if (ret) {
|
||||||
|
tdbError("tdb/btree-pget: btc open failed with ret: %d.", ret);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
tdbTrace("tdb pget, btc: %p", &btc);
|
tdbTrace("tdb pget, btc: %p", &btc);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue