diff --git a/source/libs/nodes/src/nodesCodeFuncs.c b/source/libs/nodes/src/nodesCodeFuncs.c index b648e1880945528eb4af4b531b9bc9cccfc551e6..6e60c6cadc4fb555bf4be06db363fe124f0d2643 100644 --- a/source/libs/nodes/src/nodesCodeFuncs.c +++ b/source/libs/nodes/src/nodesCodeFuncs.c @@ -1480,13 +1480,14 @@ static int32_t jsonToDatum(const SJson* pJson, void* pObj) { case TSDB_DATA_TYPE_NCHAR: case TSDB_DATA_TYPE_VARCHAR: case TSDB_DATA_TYPE_VARBINARY: { - pNode->datum.p = calloc(1, pNode->node.resType.bytes + VARSTR_HEADER_SIZE + 1); + pNode->datum.p = calloc(1, pNode->node.resType.bytes + VARSTR_HEADER_SIZE + 1 + 100); if (NULL == pNode->datum.p) { code = TSDB_CODE_OUT_OF_MEMORY; break; } varDataSetLen(pNode->datum.p, pNode->node.resType.bytes); code = tjsonGetStringValue(pJson, jkValueDatum, varDataVal(pNode->datum.p)); + nodesDebug("!!!!!!!!!len:%d,string:%s", pNode->node.resType.bytes, varDataVal(pNode->datum.p)); break; } case TSDB_DATA_TYPE_JSON: diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 61c7bfa35c621ceebd3c2a85d11606b0d24538a1..d8ea4fbfc6c176a4be6437ef8c71720551ee0996 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -404,6 +404,7 @@ static EDealRes translateValue(STranslateContext* pCxt, SValueNode* pVal) { } varDataSetLen(pVal->datum.p, pVal->node.resType.bytes); strncpy(varDataVal(pVal->datum.p), pVal->literal, pVal->node.resType.bytes); + parserDebug("!!!!!!!!!!!!value:%s,len:%d", pVal->literal, pVal->node.resType.bytes); break; } case TSDB_DATA_TYPE_TIMESTAMP: {