提交 f8436290 编写于 作者: wmmhello's avatar wmmhello

[TD-11544]<feature>(query):compatibility between old version client and new version server

上级 2af035de
......@@ -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);
......
......@@ -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;
}
......
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册