From 00e51310a237669286d1983d059c56f50ac7283b Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Tue, 28 Sep 2021 23:57:15 +0800 Subject: [PATCH] TD-6129 add tag-> where logic --- src/common/inc/tdataformat.h | 1 + src/common/src/tvariant.c | 2 +- src/tsdb/src/tsdbRead.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/common/inc/tdataformat.h b/src/common/inc/tdataformat.h index f8cc374eb0..8e26e0871d 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 de059f7dcb..b4451ca302 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 134582624f..9ec79cc7e3 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; } -- GitLab