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: 2.6 version response format #683

Merged
merged 3 commits into from
Jun 29, 2023
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
8 changes: 8 additions & 0 deletions src/benchUtil.c
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,14 @@ int postProceSql(char *sqlstr, char* dbName, int precision, int iface,
rest_port,
tcp, sockfd, filePath, responseBuf,
response_length);
// compatibility 2.6
if (-1 == g_arguments->rest_server_ver_major) {
// confirm version is 2.x according to "succ"
if (NULL != strstr(responseBuf, succMessage) && iface == REST_IFACE) {
g_arguments->rest_server_ver_major = 2;
}
}

if (NULL != strstr(responseBuf, resHttpOk) && iface == REST_IFACE) {
// if taosd is not starting , rest_server_ver_major can't be got by 'select server_version()' , so is -1
if (-1 == g_arguments->rest_server_ver_major || 3 <= g_arguments->rest_server_ver_major) {
Expand Down
10 changes: 0 additions & 10 deletions src/taosdump.c
Original file line number Diff line number Diff line change
Expand Up @@ -451,8 +451,6 @@ static struct argp_option options[] = {
{"schemaonly", 's', 0, 0, "Only dump table schemas.", 2},
{"without-property", 'N', 0, 0,
"Dump database without its properties.", 2},
{"answer-yes", 'y', 0, 0,
"Input yes for prompt. It will skip data file checking!", 3},
{"avro-codec", 'd', "snappy", 0,
"Choose an avro codec among null, deflate, snappy, and lzma.", 4},
{"start-time", 'S', "START_TIME", 0,
Expand Down Expand Up @@ -904,17 +902,9 @@ static error_t parse_opt(int key, char *arg, struct argp_state *state) {
break;

case 'E':
break;

case 's':
break;

case 'L':
break;

case 'I':
break;

case 'n':
break;

Expand Down
Loading