Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/bench issue #730

Merged
merged 2 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/benchCommandOpt.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,9 +309,9 @@ void modifyArgument() {
}

if (superTable->iface == STMT_IFACE) {
if (g_arguments->reqPerReq > INT16_MAX) {
g_arguments->reqPerReq = INT16_MAX;
}
//if (g_arguments->reqPerReq > INT16_MAX) {
// g_arguments->reqPerReq = INT16_MAX;
//}
if (g_arguments->prepared_rand > g_arguments->reqPerReq) {
g_arguments->prepared_rand = g_arguments->reqPerReq;
}
Expand Down
4 changes: 2 additions & 2 deletions src/benchData.c
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@ static int generateRandDataSQL(SSuperTable *stbInfo, char *sampleDataBuf,
static int fillStmt(
SSuperTable *stbInfo,
char *sampleDataBuf,
int bufLen,
int64_t bufLen,
int lenOfOneRow, BArray *fields,
int64_t loop, bool tag, BArray *childCols) {
// fillStmt()
Expand All @@ -835,7 +835,7 @@ static int fillStmt(
if (childCols) {
childCol = benchArrayGet(childCols, i);
}
int n = 0;
int64_t n = 0;
switch (field->type) {
case TSDB_DATA_TYPE_BOOL: {
bool boolTmp = tmpBool(field);
Expand Down
8 changes: 4 additions & 4 deletions src/benchJsonOpt.c
Original file line number Diff line number Diff line change
Expand Up @@ -763,9 +763,9 @@ static int getStableInfo(tools_cJSON *dbinfos, int index) {
superTable->iface = REST_IFACE;
} else if (0 == strcasecmp(stbIface->valuestring, "stmt")) {
superTable->iface = STMT_IFACE;
if (g_arguments->reqPerReq > INT16_MAX) {
g_arguments->reqPerReq = INT16_MAX;
}
//if (g_arguments->reqPerReq > INT16_MAX) {
// g_arguments->reqPerReq = INT16_MAX;
//}
if (g_arguments->reqPerReq > g_arguments->prepared_rand) {
g_arguments->prepared_rand = g_arguments->reqPerReq;
}
Expand Down Expand Up @@ -1400,7 +1400,7 @@ static int getMetaFromInsertJsonFile(tools_cJSON *json) {
g_arguments->reqPerReq = DEFAULT_REQ_PER_REQ;
}

if (g_arguments->reqPerReq > 32768) {
if (g_arguments->reqPerReq > INT32_MAX) {
infoPrint("warning: num_of_records_per_req item in json config need less than 32768. current = %d. now reset to default.\n", g_arguments->reqPerReq);
g_arguments->reqPerReq = DEFAULT_REQ_PER_REQ;
}
Expand Down
Loading