diff --git a/src/common/inc/tdataformat.h b/src/common/inc/tdataformat.h index f8cc374eb00e953ce307070f27a585146f5bc6da..8e26e0871d54f8eaf1c10258d2e10587c14d6a6e 100644 --- a/src/common/inc/tdataformat.h +++ b/src/common/inc/tdataformat.h @@ -564,6 +564,7 @@ static FORCE_INLINE int tdAddColToKVRow(SKVRowBuilder *pBuilder, int16_t colId, if (tlen > pBuilder->alloc - pBuilder->size) { while (tlen > pBuilder->alloc - pBuilder->size) { + assert(pBuilder->alloc > 0); pBuilder->alloc *= 2; } void* buf = realloc(pBuilder->buf, pBuilder->alloc); diff --git a/src/common/src/tvariant.c b/src/common/src/tvariant.c index de059f7dcbf48b9c3f01526de97e13260c6c92b4..b4451ca302807e6f70c3be74afd4770210f78946 100644 --- a/src/common/src/tvariant.c +++ b/src/common/src/tvariant.c @@ -232,7 +232,7 @@ bool tVariantTypeMatch(tVariant *pVar, int8_t dbType){ case TSDB_DATA_TYPE_UBIGINT: case TSDB_DATA_TYPE_FLOAT: case TSDB_DATA_TYPE_DOUBLE:{ - if(pVar->nType == TSDB_DATA_TYPE_BINARY && pVar->nType == TSDB_DATA_TYPE_NCHAR){ + if(pVar->nType == TSDB_DATA_TYPE_BINARY || pVar->nType == TSDB_DATA_TYPE_NCHAR){ return false; } break; diff --git a/src/tsdb/src/tsdbRead.c b/src/tsdb/src/tsdbRead.c index 134582624f96a2603defa1b38acf4e42e9d951fe..9ec79cc7e395df2c403d21eb18b7eda602065e1c 100644 --- a/src/tsdb/src/tsdbRead.c +++ b/src/tsdb/src/tsdbRead.c @@ -3779,8 +3779,8 @@ int32_t tsdbQuerySTableByTagCond(STsdbRepo* tsdb, uint64_t uid, TSKEY skey, cons ((SFilterInfo*)filterInfo)->pTable = pTable; ret = filterInitFromTree(expr, &filterInfo, 0); if (ret != TSDB_CODE_SUCCESS) { - filterFreeInfo(filterInfo); terrno = ret; + tsdbUnlockRepoMeta(tsdb); goto _error; }