From 30642fa1c6611a25ca7da759522392bf013dedce Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Fri, 23 Oct 2020 16:10:02 +0800 Subject: [PATCH] [td-1373] --- src/common/src/tvariant.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/src/tvariant.c b/src/common/src/tvariant.c index 78d1e38f1e..5e378c4621 100644 --- a/src/common/src/tvariant.c +++ b/src/common/src/tvariant.c @@ -144,8 +144,8 @@ void tVariantDestroy(tVariant *pVar) { void tVariantAssign(tVariant *pDst, const tVariant *pSrc) { if (pSrc == NULL || pDst == NULL) return; - *pDst = *pSrc; - + pDst->nType = pSrc->nType; + if (pSrc->nType == TSDB_DATA_TYPE_BINARY || pSrc->nType == TSDB_DATA_TYPE_NCHAR) { int32_t allocLen = pSrc->nLen + 1; int32_t len = pSrc->nLen; -- GitLab