fix: avoid crash

This commit is contained in:
yihaoDeng 2022-06-10 18:51:48 +08:00
parent 39244e08ea
commit ad25660f99
1 changed files with 21 additions and 16 deletions

View File

@ -623,6 +623,10 @@ int32_t metaFilteTableIds(SMeta *pMeta, SMetaFltParam *param, SArray *pUids) {
int32_t nTagData = 0;
void * tagData = NULL;
if (param->val == NULL) {
metaError("vgId:%d failed to filter NULL data", PRIi64, TD_VID(pMeta->pVnode), uid, smaId);
return -1;
} else {
if (IS_VAR_DATA_TYPE(param->type)) {
tagData = varDataVal(param->val);
nTagData = varDataLen(param->val);
@ -641,6 +645,7 @@ int32_t metaFilteTableIds(SMeta *pMeta, SMetaFltParam *param, SArray *pUids) {
tagData = param->val;
nTagData = tDataTypes[param->type].bytes;
}
}
ret = metaCreateTagIdxKey(pCursor->suid, pCursor->cid, tagData, nTagData, pCursor->type,
param->reverse ? INT64_MAX : INT64_MIN, &pKey, &nKey);