提交 eb82ac04 编写于 作者: wmmhello's avatar wmmhello

fix:fix error in new tag format

上级 094aaa20
...@@ -327,7 +327,8 @@ void addTagPseudoColumnData(SReadHandle *pHandle, SExprInfo* pPseudoExpr, int32_ ...@@ -327,7 +327,8 @@ void addTagPseudoColumnData(SReadHandle *pHandle, SExprInfo* pPseudoExpr, int32_
for (int32_t i = 0; i < pBlock->info.rows; ++i) { for (int32_t i = 0; i < pBlock->info.rows; ++i) {
colDataAppend(pColInfoData, i, data, (data == NULL)); colDataAppend(pColInfoData, i, data, (data == NULL));
} }
if(pColInfoData->info.type != TSDB_DATA_TYPE_JSON && IS_VAR_DATA_TYPE(((const STagVal *)p)->type) && data){ if(pColInfoData->info.type != TSDB_DATA_TYPE_JSON && p != NULL &&
IS_VAR_DATA_TYPE(((const STagVal *)p)->type) && data){
taosMemoryFree(data); taosMemoryFree(data);
} }
} }
......
...@@ -2126,7 +2126,7 @@ static int32_t smlBuildTagRow(SArray* cols, SParsedDataColInfo* tags, SSchema* p ...@@ -2126,7 +2126,7 @@ static int32_t smlBuildTagRow(SArray* cols, SParsedDataColInfo* tags, SSchema* p
val.nData = kv->length; val.nData = kv->length;
}else if(pTagSchema->type == TSDB_DATA_TYPE_NCHAR){ }else if(pTagSchema->type == TSDB_DATA_TYPE_NCHAR){
int32_t output = 0; int32_t output = 0;
void *p = taosMemoryCalloc(1, kv->length * TSDB_NCHAR_SIZE); void *p = taosMemoryCalloc(1, pTagSchema->bytes - VARSTR_HEADER_SIZE);
if(p == NULL){ if(p == NULL){
code = TSDB_CODE_OUT_OF_MEMORY; code = TSDB_CODE_OUT_OF_MEMORY;
goto end; goto end;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册