[TD-4136]<fix>: taosdemo max records per req < 32767 (#6082)
Co-authored-by: Shuduo Sang <sdsang@taosdata.com>
This commit is contained in:
parent
055919a7a7
commit
af33e11840
|
@ -68,6 +68,14 @@ enum TEST_MODE {
|
||||||
INVAID_TEST
|
INVAID_TEST
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum QUERY_MODE {
|
||||||
|
SYNC_QUERY_MODE, // 0
|
||||||
|
ASYNC_QUERY_MODE, // 1
|
||||||
|
INVALID_MODE
|
||||||
|
};
|
||||||
|
|
||||||
|
#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
|
||||||
|
@ -3436,10 +3444,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__);
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
"confirm_parameter_prompt": "no",
|
"confirm_parameter_prompt": "no",
|
||||||
"databases": "db",
|
"databases": "db",
|
||||||
"query_times": 2,
|
"query_times": 2,
|
||||||
"query_mode": "restful",
|
"query_mode": "rest",
|
||||||
"specified_table_query": {
|
"specified_table_query": {
|
||||||
"query_interval": 1,
|
"query_interval": 1,
|
||||||
"concurrent": 3,
|
"concurrent": 3,
|
||||||
|
|
Loading…
Reference in New Issue