提交 d026efa9 编写于 作者: H Hongze Cheng

fix tag_filter invalid read

上级 6b69b1a7
...@@ -259,7 +259,7 @@ bool isNEleNull(SDataCol *pCol, int nEle) { ...@@ -259,7 +259,7 @@ bool isNEleNull(SDataCol *pCol, int nEle) {
case TSDB_DATA_TYPE_BINARY: case TSDB_DATA_TYPE_BINARY:
case TSDB_DATA_TYPE_NCHAR: case TSDB_DATA_TYPE_NCHAR:
for (int i = 0; i < nEle; i++) { for (int i = 0; i < nEle; i++) {
if (!isNull(varDataVal(tdGetColDataOfRow(pCol, i)), pCol->type)) return false; if (!isNull(tdGetColDataOfRow(pCol, i), pCol->type)) return false;
} }
return true; return true;
default: default:
......
...@@ -2219,7 +2219,7 @@ static void doSetTagValueInParam(void *tsdb, void* pTable, int32_t tagColId, tVa ...@@ -2219,7 +2219,7 @@ static void doSetTagValueInParam(void *tsdb, void* pTable, int32_t tagColId, tVa
} }
if (type == TSDB_DATA_TYPE_BINARY || type == TSDB_DATA_TYPE_NCHAR) { if (type == TSDB_DATA_TYPE_BINARY || type == TSDB_DATA_TYPE_NCHAR) {
if (isNull(varDataVal(val), type)) { if (isNull(val, type)) {
tag->nType = TSDB_DATA_TYPE_NULL; tag->nType = TSDB_DATA_TYPE_NULL;
return; return;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册