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

[TD-4136]<fix>: taosdemo records per req more than 32767. (#6087)

for develop branch.
Co-authored-by: NShuduo Sang <sdsang@taosdata.com>
上级 ed903bd9
...@@ -68,6 +68,8 @@ enum TEST_MODE { ...@@ -68,6 +68,8 @@ enum TEST_MODE {
INVAID_TEST INVAID_TEST
}; };
#define MAX_RECORDS_PER_REQ 32766
#define MAX_SQL_SIZE 65536 #define MAX_SQL_SIZE 65536
#define BUFFER_SIZE (65536*2) #define BUFFER_SIZE (65536*2)
#define COND_BUF_LEN BUFFER_SIZE - 30 #define COND_BUF_LEN BUFFER_SIZE - 30
...@@ -3434,10 +3436,12 @@ static bool getMetaFromInsertJsonFile(cJSON* root) { ...@@ -3434,10 +3436,12 @@ static bool getMetaFromInsertJsonFile(cJSON* root) {
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;
} else if (numRecPerReq->valueint > MAX_RECORDS_PER_REQ) {
numRecPerReq->valueint = MAX_RECORDS_PER_REQ;
} }
g_args.num_of_RPR = numRecPerReq->valueint; g_args.num_of_RPR = numRecPerReq->valueint;
} else if (!numRecPerReq) { } else if (!numRecPerReq) {
g_args.num_of_RPR = UINT64_MAX; g_args.num_of_RPR = MAX_RECORDS_PER_REQ;
} else { } else {
errorPrint("%s() LN%d, failed to read json, num_of_records_per_req not found\n", errorPrint("%s() LN%d, failed to read json, num_of_records_per_req not found\n",
__func__, __LINE__); __func__, __LINE__);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册