提交 9bbf36d3 编写于 作者: M Minglei Jin

cache/serialize: keep original col value untouched

上级 84987c49
......@@ -180,11 +180,12 @@ void tsdbCacheSerialize(SLastCol *pLastCol, char **value, size_t *size) {
*(SLastCol *)(*value) = *pLastCol;
if (IS_VAR_DATA_TYPE(pColVal->type)) {
uint8_t *pVal = pColVal->value.pData;
pColVal->value.pData = *value + sizeof(*pLastCol);
SColVal *pDColVal = &((SLastCol *)(*value))->colVal;
pDColVal->value.pData = *value + sizeof(*pLastCol);
if (pColVal->value.nData > 0) {
memcpy(pColVal->value.pData, pVal, pColVal->value.nData);
memcpy(pDColVal->value.pData, pVal, pColVal->value.nData);
} else {
pColVal->value.pData = NULL;
pDColVal->value.pData = NULL;
}
}
*size = length;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册