diff --git a/src/client/src/tscUtil.c b/src/client/src/tscUtil.c index ac45c89e713e48be32f26e45ac6715236e3bab72..3d47973f6784e1d8e8fd7a7bcc4dba89e06f1dd2 100644 --- a/src/client/src/tscUtil.c +++ b/src/client/src/tscUtil.c @@ -5203,7 +5203,7 @@ char* parseTagDatatoJson(void *p){ }else{ // json value char tagJsonValue[TSDB_MAX_TAGS_LEN] = {0}; if(*(char*)val == cJSON_String){ - int32_t length = taosUcs4ToMbs(varDataVal(val + CHAR_BYTES), varDataLen(val + CHAR_BYTES), tagJsonValue); + int32_t length = taosUcs4ToMbs(varDataVal(POINTER_SHIFT(val,CHAR_BYTES)), varDataLen(POINTER_SHIFT(val,CHAR_BYTES)), tagJsonValue); if (length == 0) { tscError("charset:%s to %s. val:%s convert json value failed.", DEFAULT_UNICODE_ENCODEC, tsCharset, (char*)val); goto end; @@ -5215,7 +5215,7 @@ char* parseTagDatatoJson(void *p){ } cJSON_AddItemToObject(json, tagJsonKey, value); }else if(*(char*)val == cJSON_Number){ - double jsonVd = *(double*)(val + CHAR_BYTES); + double jsonVd = *(double*)(POINTER_SHIFT(val,CHAR_BYTES)); cJSON* value = cJSON_CreateNumber(jsonVd); if (value == NULL) { diff --git a/src/tsdb/src/tsdbMeta.c b/src/tsdb/src/tsdbMeta.c index 8646e68763290251f3638bc4150ac0d589cfaf47..e1bc5f05d9a287113c9e3ad6f50f23b29bd0d8fc 100644 --- a/src/tsdb/src/tsdbMeta.c +++ b/src/tsdb/src/tsdbMeta.c @@ -212,7 +212,7 @@ void *tsdbGetTableTagVal(const void* pTable, int32_t colId, int16_t type, int16_ char *val = NULL; if (type == TSDB_DATA_TYPE_JSON){ - val = kvRowValues(((STable*)pTable)->tagVal); + val = ((STable*)pTable)->tagVal; }else{ val = tdGetKVRowValOfCol(((STable*)pTable)->tagVal, colId); }