Hotfix/sangshuduo/td 4053 taosdemo more value scope check (#6022)

* [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: Shuduo Sang <sdsang@taosdata.com>
This commit is contained in:
Shuduo Sang 2021-05-07 12:02:17 +08:00 committed by GitHub
parent 842c17caa7
commit afd1b650fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -3403,7 +3403,7 @@ static bool getMetaFromInsertJsonFile(cJSON* root) {
cJSON* numRecPerReq = cJSON_GetObjectItem(root, "num_of_records_per_req");
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",
__func__, __LINE__);
goto PARSE_OVER;
@ -4744,7 +4744,7 @@ static int64_t generateDataTail(
verbosePrint("%s() LN%d batch=%"PRIu64"\n", __func__, __LINE__, batch);
int64_t k = 0;
uint64_t k = 0;
for (k = 0; k < batch;) {
char data[MAX_DATA_SIZE];
memset(data, 0, MAX_DATA_SIZE);