未验证 提交 91ab5f22 编写于 作者: sangshuduo's avatar sangshuduo 提交者: GitHub

[TD-6194]<fix>: taosdemo wrong data (#7517)

上级 df0fdba6
...@@ -5216,7 +5216,8 @@ static int64_t generateStbRowData( ...@@ -5216,7 +5216,8 @@ static int64_t generateStbRowData(
tmpLen = strlen(tmp); tmpLen = strlen(tmp);
tstrncpy(pstr + dataLen, tmp, min(tmpLen +1, INT_BUFF_LEN)); tstrncpy(pstr + dataLen, tmp, min(tmpLen +1, INT_BUFF_LEN));
} else { } else {
errorPrint( "Not support data type: %s\n", stbInfo->columns[i].dataType); errorPrint( "Not support data type: %s\n",
stbInfo->columns[i].dataType);
return -1; return -1;
} }
...@@ -5229,8 +5230,7 @@ static int64_t generateStbRowData( ...@@ -5229,8 +5230,7 @@ static int64_t generateStbRowData(
return 0; return 0;
} }
dataLen -= 1; tstrncpy(pstr + dataLen - 1, ")", 2);
dataLen += snprintf(pstr + dataLen, maxLen - dataLen, ")");
verbosePrint("%s() LN%d, dataLen:%"PRId64"\n", __func__, __LINE__, dataLen); verbosePrint("%s() LN%d, dataLen:%"PRId64"\n", __func__, __LINE__, dataLen);
verbosePrint("%s() LN%d, recBuf:\n\t%s\n", __func__, __LINE__, recBuf); verbosePrint("%s() LN%d, recBuf:\n\t%s\n", __func__, __LINE__, recBuf);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册