提交 5cc8da59 编写于 作者: dengyihao's avatar dengyihao

Merge branch 'feature/scheduler' of https://github.com/taosdata/TDengine into sche

...@@ -141,12 +141,12 @@ static SNode* valueNodeCopy(const SValueNode* pSrc, SValueNode* pDst) { ...@@ -141,12 +141,12 @@ static SNode* valueNodeCopy(const SValueNode* pSrc, SValueNode* pDst) {
case TSDB_DATA_TYPE_NCHAR: case TSDB_DATA_TYPE_NCHAR:
case TSDB_DATA_TYPE_VARCHAR: case TSDB_DATA_TYPE_VARCHAR:
case TSDB_DATA_TYPE_VARBINARY: case TSDB_DATA_TYPE_VARBINARY:
pDst->datum.p = malloc(pSrc->node.resType.bytes + VARSTR_HEADER_SIZE); pDst->datum.p = malloc(pSrc->node.resType.bytes + VARSTR_HEADER_SIZE + 1);
if (NULL == pDst->datum.p) { if (NULL == pDst->datum.p) {
nodesDestroyNode(pDst); nodesDestroyNode(pDst);
return NULL; return NULL;
} }
memcpy(pDst->datum.p, pSrc->datum.p, pSrc->node.resType.bytes + VARSTR_HEADER_SIZE); memcpy(pDst->datum.p, pSrc->datum.p, pSrc->node.resType.bytes + VARSTR_HEADER_SIZE + 1);
break; break;
case TSDB_DATA_TYPE_JSON: case TSDB_DATA_TYPE_JSON:
case TSDB_DATA_TYPE_DECIMAL: case TSDB_DATA_TYPE_DECIMAL:
......
...@@ -1418,6 +1418,7 @@ static int32_t datumToJson(const void* pObj, SJson* pJson) { ...@@ -1418,6 +1418,7 @@ static int32_t datumToJson(const void* pObj, SJson* pJson) {
case TSDB_DATA_TYPE_VARCHAR: case TSDB_DATA_TYPE_VARCHAR:
case TSDB_DATA_TYPE_VARBINARY: case TSDB_DATA_TYPE_VARBINARY:
code = tjsonAddStringToObject(pJson, jkValueDatum, varDataVal(pNode->datum.p)); code = tjsonAddStringToObject(pJson, jkValueDatum, varDataVal(pNode->datum.p));
nodesDebug("!!!!!!!!tojson, value:%s", varDataVal(pNode->datum.p));
break; break;
case TSDB_DATA_TYPE_JSON: case TSDB_DATA_TYPE_JSON:
case TSDB_DATA_TYPE_DECIMAL: case TSDB_DATA_TYPE_DECIMAL:
...@@ -2429,11 +2430,4 @@ int32_t nodesStringToList(const char* pStr, SNodeList** pList) { ...@@ -2429,11 +2430,4 @@ int32_t nodesStringToList(const char* pStr, SNodeList** pList) {
if (NULL == pJson) { if (NULL == pJson) {
return TSDB_CODE_FAILED; return TSDB_CODE_FAILED;
} }
int32_t code = jsonToNodeListImpl(pJson, pList); int32_t
if (TSDB_CODE_SUCCESS != code) { \ No newline at end of file
nodesDestroyList(*pList);
terrno = code;
return code;
}
return TSDB_CODE_SUCCESS;
}
...@@ -404,7 +404,6 @@ static EDealRes translateValue(STranslateContext* pCxt, SValueNode* pVal) { ...@@ -404,7 +404,6 @@ static EDealRes translateValue(STranslateContext* pCxt, SValueNode* pVal) {
} }
varDataSetLen(pVal->datum.p, pVal->node.resType.bytes); varDataSetLen(pVal->datum.p, pVal->node.resType.bytes);
strncpy(varDataVal(pVal->datum.p), pVal->literal, 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; break;
} }
case TSDB_DATA_TYPE_TIMESTAMP: { case TSDB_DATA_TYPE_TIMESTAMP: {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册