From f84362902c669e0eab0669426f75a97d8c16ce79 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Thu, 20 Jan 2022 12:53:38 +0800 Subject: [PATCH] [TD-11544](query):compatibility between old version client and new version server --- src/client/src/tscSql.c | 4 ++-- src/mnode/src/mnodeShow.c | 4 ++-- src/query/src/qExecutor.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/client/src/tscSql.c b/src/client/src/tscSql.c index 2a60448a3e..4101105668 100644 --- a/src/client/src/tscSql.c +++ b/src/client/src/tscSql.c @@ -213,8 +213,8 @@ TAOS *taos_connect_internal(const char *ip, const char *user, const char *pass, tscDebug("%p DB connection is opening, rpcObj: %p, dnodeConn:%p", pObj, pObj->pRpcObj, pObj->pRpcObj->pDnodeConn); taos_free_result(pSql); - // version compare only requires the first 3 segments of the version string - int code = taosCheckVersion(version, taos_get_server_info(pObj), 3); + // version compare only requires the first 1 segments of the version string + int code = taosCheckVersion(version, taos_get_server_info(pObj), 1); if (code != 0) { terrno = code; taos_close(pObj); diff --git a/src/mnode/src/mnodeShow.c b/src/mnode/src/mnodeShow.c index 960987e7ad..fd0eeea7ee 100644 --- a/src/mnode/src/mnodeShow.c +++ b/src/mnode/src/mnodeShow.c @@ -243,7 +243,7 @@ static int32_t mnodeProcessHeartBeatMsg(SMnodeMsg *pMsg) { } SHeartBeatMsg *pHBMsg = pMsg->rpcMsg.pCont; - if (taosCheckVersion(pHBMsg->clientVer, version, 3) != TSDB_CODE_SUCCESS) { + if (taosCheckVersion(pHBMsg->clientVer, version, 1) != TSDB_CODE_SUCCESS) { rpcFreeCont(pRsp); return TSDB_CODE_TSC_INVALID_VERSION; // todo change the error code } @@ -307,7 +307,7 @@ static int32_t mnodeProcessConnectMsg(SMnodeMsg *pMsg) { goto connect_over; } - code = taosCheckVersion(pConnectMsg->clientVersion, version, 3); + code = taosCheckVersion(pConnectMsg->clientVersion, version, 1); if (code != TSDB_CODE_SUCCESS) { goto connect_over; } diff --git a/src/query/src/qExecutor.c b/src/query/src/qExecutor.c index caa199f2ab..db2c4b5936 100644 --- a/src/query/src/qExecutor.c +++ b/src/query/src/qExecutor.c @@ -7945,7 +7945,7 @@ static int32_t deserializeColFilterInfo(SColumnFilterInfo* pColFilters, int16_t int32_t convertQueryMsg(SQueryTableMsg *pQueryMsg, SQueryParam* param) { int32_t code = TSDB_CODE_SUCCESS; - if (taosCheckVersion(pQueryMsg->version, version, 3) != 0) { + if (taosCheckVersion(pQueryMsg->version, version, 1) != 0) { return TSDB_CODE_QRY_INVALID_MSG; } -- GitLab