Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
340f24f7
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22017
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
340f24f7
编写于
1月 20, 2022
作者:
S
shenglian-zhou
提交者:
GitHub
1月 20, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #9923 from taosdata/fix/TD-11544
[TD-11544]<feature>(query):the is no use to check version, because it…
上级
93204385
b0b0cd7b
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
5 addition
and
93 deletion
+5
-93
src/client/src/tscServer.c
src/client/src/tscServer.c
+0
-4
src/client/src/tscSql.c
src/client/src/tscSql.c
+2
-10
src/inc/taosmsg.h
src/inc/taosmsg.h
+3
-3
src/mnode/src/mnodeShow.c
src/mnode/src/mnodeShow.c
+0
-9
src/query/src/qExecutor.c
src/query/src/qExecutor.c
+0
-4
src/util/inc/tutil.h
src/util/inc/tutil.h
+0
-3
src/util/src/tutil.c
src/util/src/tutil.c
+0
-60
未找到文件。
src/client/src/tscServer.c
浏览文件 @
340f24f7
...
...
@@ -1933,9 +1933,6 @@ int tscBuildConnectMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
tstrncpy
(
pConnect
->
db
,
db
,
sizeof
(
pConnect
->
db
));
pthread_mutex_unlock
(
&
pObj
->
mutex
);
tstrncpy
(
pConnect
->
clientVersion
,
version
,
sizeof
(
pConnect
->
clientVersion
));
tstrncpy
(
pConnect
->
msgVersion
,
""
,
sizeof
(
pConnect
->
msgVersion
));
pConnect
->
pid
=
htonl
(
taosGetPId
());
taosGetCurrentAPPName
(
pConnect
->
appName
,
NULL
);
...
...
@@ -2035,7 +2032,6 @@ int tscBuildHeartBeatMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
// TODO the expired hb and client can not be identified by server till now.
SHeartBeatMsg
*
pHeartbeat
=
(
SHeartBeatMsg
*
)
pCmd
->
payload
;
tstrncpy
(
pHeartbeat
->
clientVer
,
version
,
tListLen
(
pHeartbeat
->
clientVer
));
pHeartbeat
->
numOfQueries
=
numOfQueries
;
pHeartbeat
->
numOfStreams
=
numOfStreams
;
...
...
src/client/src/tscSql.c
浏览文件 @
340f24f7
...
...
@@ -212,16 +212,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
);
if
(
code
!=
0
)
{
terrno
=
code
;
taos_close
(
pObj
);
return
NULL
;
}
else
{
return
pObj
;
}
return
pObj
;
}
return
NULL
;
...
...
src/inc/taosmsg.h
浏览文件 @
340f24f7
...
...
@@ -335,8 +335,8 @@ typedef struct {
typedef
struct
{
int8_t
extend
;
char
clientVersion
[
TSDB_VERSION_LEN
];
char
msgVersion
[
TSDB_VERSION_LEN
];
char
clientVersion
[
TSDB_VERSION_LEN
];
// useless
char
msgVersion
[
TSDB_VERSION_LEN
];
// useless
char
db
[
TSDB_TABLE_FNAME_LEN
];
char
appName
[
TSDB_APPNAME_LEN
];
int32_t
pid
;
...
...
@@ -920,7 +920,7 @@ typedef struct {
typedef
struct
{
int8_t
extend
;
char
clientVer
[
TSDB_VERSION_LEN
];
char
clientVer
[
TSDB_VERSION_LEN
];
// useless
uint32_t
connId
;
int32_t
pid
;
int32_t
numOfQueries
;
...
...
src/mnode/src/mnodeShow.c
浏览文件 @
340f24f7
...
...
@@ -243,10 +243,6 @@ static int32_t mnodeProcessHeartBeatMsg(SMnodeMsg *pMsg) {
}
SHeartBeatMsg
*
pHBMsg
=
pMsg
->
rpcMsg
.
pCont
;
if
(
taosCheckVersion
(
pHBMsg
->
clientVer
,
version
,
3
)
!=
TSDB_CODE_SUCCESS
)
{
rpcFreeCont
(
pRsp
);
return
TSDB_CODE_TSC_INVALID_VERSION
;
// todo change the error code
}
SRpcConnInfo
connInfo
=
{
0
};
rpcGetConnInfo
(
pMsg
->
rpcMsg
.
handle
,
&
connInfo
);
...
...
@@ -307,11 +303,6 @@ static int32_t mnodeProcessConnectMsg(SMnodeMsg *pMsg) {
goto
connect_over
;
}
code
=
taosCheckVersion
(
pConnectMsg
->
clientVersion
,
version
,
3
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
goto
connect_over
;
}
SUserObj
*
pUser
=
pMsg
->
pUser
;
SAcctObj
*
pAcct
=
pUser
->
pAcct
;
...
...
src/query/src/qExecutor.c
浏览文件 @
340f24f7
...
...
@@ -8471,10 +8471,6 @@ 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
)
{
return
TSDB_CODE_QRY_INVALID_MSG
;
}
pQueryMsg
->
numOfTables
=
htonl
(
pQueryMsg
->
numOfTables
);
pQueryMsg
->
window
.
skey
=
htobe64
(
pQueryMsg
->
window
.
skey
);
pQueryMsg
->
window
.
ekey
=
htobe64
(
pQueryMsg
->
window
.
ekey
);
...
...
src/util/inc/tutil.h
浏览文件 @
340f24f7
...
...
@@ -41,9 +41,6 @@ char * paGetToken(char *src, char **token, int32_t *tokenLen);
int32_t
taosByteArrayToHexStr
(
char
bytes
[],
int32_t
len
,
char
hexstr
[]);
int32_t
taosHexStrToByteArray
(
char
hexstr
[],
char
bytes
[]);
bool
taosGetVersionNumber
(
char
*
versionStr
,
int
*
versionNubmer
);
int
taosCheckVersion
(
char
*
input_client_version
,
char
*
input_server_version
,
int
compared_segments
);
char
*
taosIpStr
(
uint32_t
ipInt
);
uint32_t
ip2uint
(
const
char
*
const
ip_addr
);
void
jsonKeyMd5
(
void
*
pMsg
,
int
msgLen
,
void
*
pKey
);
...
...
src/util/src/tutil.c
浏览文件 @
340f24f7
...
...
@@ -444,66 +444,6 @@ int32_t taosHexStrToByteArray(char hexstr[], char bytes[]) {
return
0
;
}
// TODO move to comm module
bool
taosGetVersionNumber
(
char
*
versionStr
,
int
*
versionNubmer
)
{
if
(
versionStr
==
NULL
||
versionNubmer
==
NULL
)
{
return
false
;
}
int
versionNumberPos
[
5
]
=
{
0
};
int
len
=
(
int
)
strlen
(
versionStr
);
int
dot
=
0
;
for
(
int
pos
=
0
;
pos
<
len
&&
dot
<
4
;
++
pos
)
{
if
(
versionStr
[
pos
]
==
'.'
)
{
versionStr
[
pos
]
=
0
;
versionNumberPos
[
++
dot
]
=
pos
+
1
;
}
}
if
(
dot
!=
3
)
{
return
false
;
}
for
(
int
pos
=
0
;
pos
<
4
;
++
pos
)
{
versionNubmer
[
pos
]
=
atoi
(
versionStr
+
versionNumberPos
[
pos
]);
}
versionStr
[
versionNumberPos
[
1
]
-
1
]
=
'.'
;
versionStr
[
versionNumberPos
[
2
]
-
1
]
=
'.'
;
versionStr
[
versionNumberPos
[
3
]
-
1
]
=
'.'
;
return
true
;
}
int
taosCheckVersion
(
char
*
input_client_version
,
char
*
input_server_version
,
int
comparedSegments
)
{
char
client_version
[
TSDB_VERSION_LEN
]
=
{
0
};
char
server_version
[
TSDB_VERSION_LEN
]
=
{
0
};
int
clientVersionNumber
[
4
]
=
{
0
};
int
serverVersionNumber
[
4
]
=
{
0
};
tstrncpy
(
client_version
,
input_client_version
,
sizeof
(
client_version
));
tstrncpy
(
server_version
,
input_server_version
,
sizeof
(
server_version
));
if
(
!
taosGetVersionNumber
(
client_version
,
clientVersionNumber
))
{
uError
(
"invalid client version:%s"
,
client_version
);
return
TSDB_CODE_TSC_INVALID_VERSION
;
}
if
(
!
taosGetVersionNumber
(
server_version
,
serverVersionNumber
))
{
uError
(
"invalid server version:%s"
,
server_version
);
return
TSDB_CODE_TSC_INVALID_VERSION
;
}
for
(
int32_t
i
=
0
;
i
<
comparedSegments
;
++
i
)
{
if
(
clientVersionNumber
[
i
]
!=
serverVersionNumber
[
i
])
{
uError
(
"the %d-th number of server version:%s not matched with client version:%s"
,
i
,
server_version
,
client_version
);
return
TSDB_CODE_TSC_INVALID_VERSION
;
}
}
return
0
;
}
char
*
taosIpStr
(
uint32_t
ipInt
)
{
static
char
ipStrArray
[
3
][
30
];
static
int
ipStrIndex
=
0
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录