Skip to content

Commit

Permalink
fix: 2.6 version response format
Browse files Browse the repository at this point in the history
  • Loading branch information
DuanKuanJun committed Jun 29, 2023
1 parent 8527bfb commit b301364
Showing 1 changed file with 8 additions and 0 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

0 comments on commit b301364

Please sign in to comment.