Skip to content

Commit

Permalink
fix: 2.6 version response format (#683)
Browse files Browse the repository at this point in the history
* fix: 2.6 version response format

* fix: support -y option compatibioty 2.6

* fix: taodump remove -y option
  • Loading branch information
DuanKuanJun committed Jun 29, 2023
1 parent c455d6d commit ca59720
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
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

0 comments on commit ca59720

Please sign in to comment.