fix varchr len issue
This commit is contained in:
parent
5fc9aa5ec1
commit
741ec2f5ac
|
@ -2177,7 +2177,7 @@ static int32_t jsonToDatum(const SJson* pJson, void* pObj) {
|
||||||
code = TSDB_CODE_OUT_OF_MEMORY;
|
code = TSDB_CODE_OUT_OF_MEMORY;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
varDataSetLen(pNode->datum.p, pNode->node.resType.bytes);
|
varDataSetLen(pNode->datum.p, pNode->node.resType.bytes - VARSTR_HEADER_SIZE);
|
||||||
if (TSDB_DATA_TYPE_NCHAR == pNode->node.resType.type) {
|
if (TSDB_DATA_TYPE_NCHAR == pNode->node.resType.type) {
|
||||||
char* buf = taosMemoryCalloc(1, pNode->node.resType.bytes * 2 + VARSTR_HEADER_SIZE + 1);
|
char* buf = taosMemoryCalloc(1, pNode->node.resType.bytes * 2 + VARSTR_HEADER_SIZE + 1);
|
||||||
if (NULL == buf) {
|
if (NULL == buf) {
|
||||||
|
|
Loading…
Reference in New Issue