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

Hotfix/sangshuduo/td 4053 taosdemo more value scope check for develop (#6023)

* [TD-4035]<fix>: taosdemo more checking for prevent value out of scope.

* [TD-4035]<fix>: taosdemo more checking for prevent value out of scope.

change min rows and max rows to unsigned int and 0 means default.

* [TD-4035]<fix>: taosdemo more checking for prevent value out of scope.

change offset=0 to get all childtable count
Co-authored-by: NShuduo Sang <sdsang@taosdata.com>
上级 e0cd8d13
...@@ -3403,7 +3403,7 @@ static bool getMetaFromInsertJsonFile(cJSON* root) { ...@@ -3403,7 +3403,7 @@ static bool getMetaFromInsertJsonFile(cJSON* root) {
cJSON* numRecPerReq = cJSON_GetObjectItem(root, "num_of_records_per_req"); cJSON* numRecPerReq = cJSON_GetObjectItem(root, "num_of_records_per_req");
if (numRecPerReq && numRecPerReq->type == cJSON_Number) { if (numRecPerReq && numRecPerReq->type == cJSON_Number) {
if (numRecPerReq->valueint < 0) { if (numRecPerReq->valueint <= 0) {
errorPrint("%s() LN%d, failed to read json, num_of_records_per_req input mistake\n", errorPrint("%s() LN%d, failed to read json, num_of_records_per_req input mistake\n",
__func__, __LINE__); __func__, __LINE__);
goto PARSE_OVER; goto PARSE_OVER;
...@@ -4744,7 +4744,7 @@ static int64_t generateDataTail( ...@@ -4744,7 +4744,7 @@ static int64_t generateDataTail(
verbosePrint("%s() LN%d batch=%"PRIu64"\n", __func__, __LINE__, batch); verbosePrint("%s() LN%d batch=%"PRIu64"\n", __func__, __LINE__, batch);
int64_t k = 0; uint64_t k = 0;
for (k = 0; k < batch;) { for (k = 0; k < batch;) {
char data[MAX_DATA_SIZE]; char data[MAX_DATA_SIZE];
memset(data, 0, MAX_DATA_SIZE); memset(data, 0, MAX_DATA_SIZE);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册