Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
cee2e18b
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1187
Star
22018
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
cee2e18b
编写于
2月 23, 2020
作者:
S
slguan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
change message name
上级
cdee51f6
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
262 addition
and
260 deletion
+262
-260
src/client/src/tscProfile.c
src/client/src/tscProfile.c
+8
-8
src/client/src/tscServer.c
src/client/src/tscServer.c
+17
-17
src/inc/mnode.h
src/inc/mnode.h
+3
-3
src/inc/taosmsg.h
src/inc/taosmsg.h
+17
-17
src/mnode/inc/mgmtProfile.h
src/mnode/inc/mgmtProfile.h
+1
-1
src/mnode/inc/mgmtShell.h
src/mnode/inc/mgmtShell.h
+1
-1
src/mnode/src/mgmtAcct.c
src/mnode/src/mgmtAcct.c
+11
-0
src/mnode/src/mgmtProfile.c
src/mnode/src/mgmtProfile.c
+14
-14
src/mnode/src/mgmtShell.c
src/mnode/src/mgmtShell.c
+190
-199
未找到文件。
src/client/src/tscProfile.c
浏览文件 @
cee2e18b
...
...
@@ -209,16 +209,16 @@ void tscKillStream(STscObj *pObj, uint32_t killId) {
}
char
*
tscBuildQueryStreamDesc
(
char
*
pMsg
,
STscObj
*
pObj
)
{
S
CMQqueryList
*
pQList
=
(
SCM
QqueryList
*
)
pMsg
;
S
QqueryList
*
pQList
=
(
S
QqueryList
*
)
pMsg
;
char
*
pMax
=
pMsg
+
TSDB_PAYLOAD_SIZE
-
256
;
S
CM
QueryDesc
*
pQdesc
=
pQList
->
qdesc
;
SQueryDesc
*
pQdesc
=
pQList
->
qdesc
;
pQList
->
numOfQueries
=
0
;
// We extract the lock to tscBuildHeartBeatMsg function.
/* pthread_mutex_lock (&pObj->mutex); */
pMsg
+=
sizeof
(
S
CM
QqueryList
);
pMsg
+=
sizeof
(
SQqueryList
);
SSqlObj
*
pSql
=
pObj
->
sqlList
;
while
(
pSql
)
{
/*
...
...
@@ -239,15 +239,15 @@ char *tscBuildQueryStreamDesc(char *pMsg, STscObj *pObj) {
pQList
->
numOfQueries
++
;
pQdesc
++
;
pSql
=
pSql
->
next
;
pMsg
+=
sizeof
(
S
CM
QueryDesc
);
pMsg
+=
sizeof
(
SQueryDesc
);
if
(
pMsg
>
pMax
)
break
;
}
S
CMStreamList
*
pSList
=
(
SCM
StreamList
*
)
pMsg
;
S
CM
StreamDesc
*
pSdesc
=
pSList
->
sdesc
;
S
StreamList
*
pSList
=
(
S
StreamList
*
)
pMsg
;
SStreamDesc
*
pSdesc
=
pSList
->
sdesc
;
pSList
->
numOfStreams
=
0
;
pMsg
+=
sizeof
(
S
CM
StreamList
);
pMsg
+=
sizeof
(
SStreamList
);
SSqlStream
*
pStream
=
pObj
->
streamList
;
while
(
pStream
)
{
strncpy
(
pSdesc
->
sql
,
pStream
->
pSql
->
sqlstr
,
TSDB_SHOW_SQL_LEN
-
1
);
...
...
@@ -265,7 +265,7 @@ char *tscBuildQueryStreamDesc(char *pMsg, STscObj *pObj) {
pSList
->
numOfStreams
++
;
pSdesc
++
;
pStream
=
pStream
->
next
;
pMsg
+=
sizeof
(
S
CM
StreamDesc
);
pMsg
+=
sizeof
(
SStreamDesc
);
if
(
pMsg
>
pMax
)
break
;
}
...
...
src/client/src/tscServer.c
浏览文件 @
cee2e18b
...
...
@@ -116,7 +116,7 @@ void tscProcessHeartBeatRsp(void *param, TAOS_RES *tres, int code) {
SSqlRes
*
pRes
=
&
pSql
->
res
;
if
(
code
==
0
)
{
S
CMHeartBeatRsp
*
pRsp
=
(
SCM
HeartBeatRsp
*
)
pRes
->
pRsp
;
S
HeartBeatRsp
*
pRsp
=
(
S
HeartBeatRsp
*
)
pRes
->
pRsp
;
SRpcIpSet
*
pIpList
=
&
pRsp
->
ipList
;
tscSetMgmtIpList
(
pIpList
);
...
...
@@ -1693,13 +1693,13 @@ int32_t tscBuildCreateDnodeMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
int32_t
tscBuildAcctMsg
(
SSqlObj
*
pSql
,
SSqlInfo
*
pInfo
)
{
SSqlCmd
*
pCmd
=
&
pSql
->
cmd
;
pCmd
->
payloadLen
=
sizeof
(
SC
MC
reateAcctMsg
);
pCmd
->
payloadLen
=
sizeof
(
SCreateAcctMsg
);
if
(
TSDB_CODE_SUCCESS
!=
tscAllocPayload
(
pCmd
,
pCmd
->
payloadLen
))
{
tscError
(
"%p failed to malloc for query msg"
,
pSql
);
return
TSDB_CODE_CLI_OUT_OF_MEMORY
;
}
SC
MCreateAcctMsg
*
pAlterMsg
=
(
SCM
CreateAcctMsg
*
)
pCmd
->
payload
;
SC
reateAcctMsg
*
pAlterMsg
=
(
S
CreateAcctMsg
*
)
pCmd
->
payload
;
SSQLToken
*
pName
=
&
pInfo
->
pDCLInfo
->
user
.
user
;
SSQLToken
*
pPwd
=
&
pInfo
->
pDCLInfo
->
user
.
passwd
;
...
...
@@ -1737,13 +1737,13 @@ int32_t tscBuildAcctMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
}
int32_t
tscBuildUserMsg
(
SSqlObj
*
pSql
,
SSqlInfo
*
pInfo
)
{
SC
MC
reateUserMsg
*
pAlterMsg
;
SCreateUserMsg
*
pAlterMsg
;
char
*
pMsg
,
*
pStart
;
SSqlCmd
*
pCmd
=
&
pSql
->
cmd
;
pMsg
=
doBuildMsgHeader
(
pSql
,
&
pStart
);
pAlterMsg
=
(
SC
MC
reateUserMsg
*
)
pMsg
;
pAlterMsg
=
(
SCreateUserMsg
*
)
pMsg
;
SUserInfo
*
pUser
=
&
pInfo
->
pDCLInfo
->
user
;
strncpy
(
pAlterMsg
->
user
,
pUser
->
user
.
z
,
pUser
->
user
.
n
);
...
...
@@ -1758,7 +1758,7 @@ int32_t tscBuildUserMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
strncpy
(
pAlterMsg
->
pass
,
pUser
->
passwd
.
z
,
pUser
->
passwd
.
n
);
}
pMsg
+=
sizeof
(
SC
MC
reateUserMsg
);
pMsg
+=
sizeof
(
SCreateUserMsg
);
pCmd
->
payloadLen
=
pMsg
-
pStart
;
if
(
pUser
->
type
==
TSDB_ALTER_USER_PASSWD
||
pUser
->
type
==
TSDB_ALTER_USER_PRIVILEGES
)
{
...
...
@@ -1871,18 +1871,18 @@ int32_t tscBuildDropDnodeMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
}
int32_t
tscBuildDropAcctMsg
(
SSqlObj
*
pSql
,
SSqlInfo
*
pInfo
)
{
S
CM
DropUserMsg
*
pDropMsg
;
SDropUserMsg
*
pDropMsg
;
char
*
pMsg
,
*
pStart
;
SSqlCmd
*
pCmd
=
&
pSql
->
cmd
;
pMsg
=
doBuildMsgHeader
(
pSql
,
&
pStart
);
pDropMsg
=
(
S
CM
DropUserMsg
*
)
pMsg
;
pDropMsg
=
(
SDropUserMsg
*
)
pMsg
;
SMeterMetaInfo
*
pMeterMetaInfo
=
tscGetMeterMetaInfo
(
pCmd
,
pCmd
->
clauseIndex
,
0
);
strcpy
(
pDropMsg
->
user
,
pMeterMetaInfo
->
name
);
pMsg
+=
sizeof
(
S
CM
DropUserMsg
);
pMsg
+=
sizeof
(
SDropUserMsg
);
pCmd
->
payloadLen
=
pMsg
-
pStart
;
pCmd
->
msgType
=
TSDB_MSG_TYPE_DROP_USER
;
...
...
@@ -2334,14 +2334,14 @@ int tscBuildConnectMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
STscObj
*
pObj
=
pSql
->
pTscObj
;
SSqlCmd
*
pCmd
=
&
pSql
->
cmd
;
pCmd
->
msgType
=
TSDB_MSG_TYPE_CONNECT
;
pCmd
->
payloadLen
=
sizeof
(
SC
MC
onnectMsg
);
pCmd
->
payloadLen
=
sizeof
(
SConnectMsg
);
if
(
TSDB_CODE_SUCCESS
!=
tscAllocPayload
(
pCmd
,
pCmd
->
payloadLen
))
{
tscError
(
"%p failed to malloc for query msg"
,
pSql
);
return
TSDB_CODE_CLI_OUT_OF_MEMORY
;
}
SC
MConnectMsg
*
pConnect
=
(
SCM
ConnectMsg
*
)
pCmd
->
payload
;
SC
onnectMsg
*
pConnect
=
(
S
ConnectMsg
*
)
pCmd
->
payload
;
char
*
db
;
// ugly code to move the space
db
=
strstr
(
pObj
->
db
,
TS_PATH_DELIMITER
);
...
...
@@ -2611,18 +2611,18 @@ int tscEstimateHeartBeatMsgLength(SSqlObj *pSql) {
STscObj
*
pObj
=
pSql
->
pTscObj
;
size
+=
tsRpcHeadSize
+
sizeof
(
SMgmtHead
);
size
+=
sizeof
(
S
CM
QqueryList
);
size
+=
sizeof
(
SQqueryList
);
SSqlObj
*
tpSql
=
pObj
->
sqlList
;
while
(
tpSql
)
{
size
+=
sizeof
(
S
CM
QueryDesc
);
size
+=
sizeof
(
SQueryDesc
);
tpSql
=
tpSql
->
next
;
}
size
+=
sizeof
(
S
CM
StreamList
);
size
+=
sizeof
(
SStreamList
);
SSqlStream
*
pStream
=
pObj
->
streamList
;
while
(
pStream
)
{
size
+=
sizeof
(
S
CM
StreamDesc
);
size
+=
sizeof
(
SStreamDesc
);
pStream
=
pStream
->
next
;
}
...
...
@@ -3043,7 +3043,7 @@ int tscProcessConnectRsp(SSqlObj *pSql) {
STscObj
*
pObj
=
pSql
->
pTscObj
;
SSqlRes
*
pRes
=
&
pSql
->
res
;
SC
MConnectRsp
*
pConnect
=
(
SCM
ConnectRsp
*
)
pRes
->
pRsp
;
SC
onnectRsp
*
pConnect
=
(
S
ConnectRsp
*
)
pRes
->
pRsp
;
strcpy
(
pObj
->
acctId
,
pConnect
->
acctId
);
// copy acctId from response
int32_t
len
=
sprintf
(
temp
,
"%s%s%s"
,
pObj
->
acctId
,
TS_PATH_DELIMITER
,
pObj
->
db
);
...
...
@@ -3051,7 +3051,7 @@ int tscProcessConnectRsp(SSqlObj *pSql) {
strncpy
(
pObj
->
db
,
temp
,
tListLen
(
pObj
->
db
));
// SIpList * pIpList;
// char *rsp = pRes->pRsp + sizeof(SC
MC
onnectRsp);
// char *rsp = pRes->pRsp + sizeof(SConnectRsp);
// pIpList = (SIpList *)rsp;
// tscSetMgmtIpList(pIpList);
...
...
src/inc/mnode.h
浏览文件 @
cee2e18b
...
...
@@ -257,8 +257,8 @@ typedef struct _user_obj {
char
updateEnd
[
1
];
struct
_user_obj
*
prev
,
*
next
;
struct
_acctObj
*
pAcct
;
S
CM
QqueryList
*
pQList
;
// query list
S
CM
StreamList
*
pSList
;
// stream list
SQqueryList
*
pQList
;
// query list
SStreamList
*
pSList
;
// stream list
}
SUserObj
;
typedef
struct
{
...
...
@@ -282,7 +282,7 @@ typedef struct {
typedef
struct
_acctObj
{
char
user
[
TSDB_USER_LEN
];
char
pass
[
TSDB_KEY_LEN
];
S
CM
AcctCfg
cfg
;
SAcctCfg
cfg
;
int32_t
acctId
;
int64_t
createdTime
;
int8_t
reserved
[
15
];
...
...
src/inc/taosmsg.h
浏览文件 @
cee2e18b
...
...
@@ -315,7 +315,7 @@ typedef struct {
char
clientVersion
[
TSDB_VERSION_LEN
];
char
msgVersion
[
TSDB_VERSION_LEN
];
char
db
[
TSDB_TABLE_ID_LEN
];
}
SC
MC
onnectMsg
;
}
SConnectMsg
;
typedef
struct
{
char
acctId
[
TSDB_ACCT_LEN
];
...
...
@@ -323,7 +323,7 @@ typedef struct {
int8_t
writeAuth
;
int8_t
superAuth
;
SRpcIpSet
ipList
;
}
SC
MC
onnectRsp
;
}
SConnectRsp
;
typedef
struct
{
int32_t
maxUsers
;
...
...
@@ -337,24 +337,24 @@ typedef struct {
int64_t
maxInbound
;
int64_t
maxOutbound
;
int8_t
accessState
;
// Configured only by command
}
S
CM
AcctCfg
;
}
SAcctCfg
;
typedef
struct
{
char
user
[
TSDB_USER_LEN
];
char
pass
[
TSDB_KEY_LEN
];
S
CM
AcctCfg
cfg
;
}
SC
MCreateAcctMsg
,
SCM
AlterAcctMsg
;
SAcctCfg
cfg
;
}
SC
reateAcctMsg
,
S
AlterAcctMsg
;
typedef
struct
{
char
user
[
TSDB_USER_LEN
];
}
S
CMDropUserMsg
,
SCM
DropAcctMsg
;
}
S
DropUserMsg
,
S
DropAcctMsg
;
typedef
struct
{
char
user
[
TSDB_USER_LEN
];
char
pass
[
TSDB_KEY_LEN
];
int8_t
privilege
;
int8_t
flag
;
}
SC
MCreateUserMsg
,
SCM
AlterUserMsg
;
}
SC
reateUserMsg
,
S
AlterUserMsg
;
typedef
struct
{
char
db
[
TSDB_TABLE_ID_LEN
];
...
...
@@ -785,7 +785,7 @@ typedef struct {
uint32_t
queryId
;
int64_t
useconds
;
int64_t
stime
;
}
S
CM
QueryDesc
;
}
SQueryDesc
;
typedef
struct
{
char
sql
[
TSDB_SHOW_SQL_LEN
];
...
...
@@ -796,29 +796,29 @@ typedef struct {
int64_t
stime
;
int64_t
slidingTime
;
int64_t
interval
;
}
S
CM
StreamDesc
;
}
SStreamDesc
;
typedef
struct
{
int32_t
numOfQueries
;
S
CM
QueryDesc
qdesc
[];
}
S
CM
QqueryList
;
SQueryDesc
qdesc
[];
}
SQqueryList
;
typedef
struct
{
int32_t
numOfStreams
;
S
CM
StreamDesc
sdesc
[];
}
S
CM
StreamList
;
SStreamDesc
sdesc
[];
}
SStreamList
;
typedef
struct
{
S
CM
QqueryList
qlist
;
S
CM
StreamList
slist
;
}
S
CM
HeartBeatMsg
;
SQqueryList
qlist
;
SStreamList
slist
;
}
SHeartBeatMsg
;
typedef
struct
{
uint32_t
queryId
;
uint32_t
streamId
;
int8_t
killConnection
;
SRpcIpSet
ipList
;
}
S
CM
HeartBeatRsp
;
}
SHeartBeatRsp
;
typedef
struct
{
uint64_t
handle
;
...
...
src/mnode/inc/mgmtProfile.h
浏览文件 @
cee2e18b
...
...
@@ -30,7 +30,7 @@ int32_t mgmtRetrieveQueries(SShowObj *pShow, char *data, int32_t rows, void *pCo
int32_t
mgmtRetrieveStreams
(
SShowObj
*
pShow
,
char
*
data
,
int32_t
rows
,
void
*
pConn
);
int32_t
mgmtSaveQueryStreamList
(
S
CM
HeartBeatMsg
*
pHBMsg
);
int32_t
mgmtSaveQueryStreamList
(
SHeartBeatMsg
*
pHBMsg
);
int32_t
mgmtKillQuery
(
char
*
qidstr
,
void
*
pConn
);
...
...
src/mnode/inc/mgmtShell.h
浏览文件 @
cee2e18b
...
...
@@ -27,7 +27,7 @@ extern "C" {
int32_t
mgmtInitShell
();
void
mgmtCleanUpShell
();
extern
int32_t
(
*
mgmtCheckRedirectMsg
)(
void
*
pConn
,
int32_t
msgType
);
extern
int32_t
(
*
mgmtCheckRedirectMsg
)(
void
*
pConn
);
extern
int32_t
(
*
mgmtProcessAlterAcctMsg
)(
void
*
pCont
,
int32_t
contLen
,
void
*
ahandle
);
extern
int32_t
(
*
mgmtProcessCreateDnodeMsg
)(
void
*
pCont
,
int32_t
contLen
,
void
*
ahandle
);
extern
int32_t
(
*
mgmtProcessCfgMnodeMsg
)(
void
*
pCont
,
int32_t
contLen
,
void
*
ahandle
);
...
...
src/mnode/src/mgmtAcct.c
浏览文件 @
cee2e18b
...
...
@@ -155,3 +155,14 @@ static int32_t mgmtRetrieveAcctsImp(SShowObj *pShow, char *data, int32_t rows, v
}
int32_t
(
*
mgmtRetrieveAccts
)(
SShowObj
*
pShow
,
char
*
data
,
int32_t
rows
,
void
*
pConn
)
=
mgmtRetrieveAcctsImp
;
SAcctObj
*
mgmtGetAcctFromConn
(
void
*
pConn
)
{
SRpcConnInfo
connInfo
;
rpcGetConnInfo
(
pConn
,
&
connInfo
);
SUserObj
*
pUser
=
mgmtGetUser
(
connInfo
.
user
);
if
(
pUser
!=
NULL
)
{
return
pUser
->
pAcct
;
}
return
NULL
;
}
src/mnode/src/mgmtProfile.c
浏览文件 @
cee2e18b
...
...
@@ -32,7 +32,7 @@ typedef struct {
int32_t
numOfQueries
;
SCDesc
*
connInfo
;
SCDesc
**
cdesc
;
S
CM
QueryDesc
qdesc
[];
SQueryDesc
qdesc
[];
}
SQueryShow
;
typedef
struct
{
...
...
@@ -40,10 +40,10 @@ typedef struct {
int32_t
numOfStreams
;
SCDesc
*
connInfo
;
SCDesc
**
cdesc
;
S
CM
StreamDesc
sdesc
[];
SStreamDesc
sdesc
[];
}
SStreamShow
;
int32_t
mgmtSaveQueryStreamList
(
S
CM
HeartBeatMsg
*
pHBMsg
)
{
int32_t
mgmtSaveQueryStreamList
(
SHeartBeatMsg
*
pHBMsg
)
{
// SAcctObj *pAcct = pConn->pAcct;
//
// if (contLen <= 0 || pAcct == NULL) {
...
...
@@ -60,7 +60,7 @@ int32_t mgmtSaveQueryStreamList(SCMHeartBeatMsg *pHBMsg) {
// pConn->pQList = realloc(pConn->pQList, contLen);
// memcpy(pConn->pQList, cont, contLen);
//
// pConn->pSList = (S
CMStreamList *)(((char *)pConn->pQList) + pConn->pQList->numOfQueries * sizeof(SCMQueryDesc) + sizeof(SCM
QqueryList));
// pConn->pSList = (S
StreamList *)(((char *)pConn->pQList) + pConn->pQList->numOfQueries * sizeof(SQueryDesc) + sizeof(S
QqueryList));
//
// pAcct->acctInfo.numOfQueries += pConn->pQList->numOfQueries;
// pAcct->acctInfo.numOfStreams += pConn->pSList->numOfStreams;
...
...
@@ -76,7 +76,7 @@ int32_t mgmtGetQueries(SShowObj *pShow, void *pConn) {
//
// pthread_mutex_lock(&pAcct->mutex);
//
// pQueryShow = malloc(sizeof(S
CM
QueryDesc) * pAcct->acctInfo.numOfQueries + sizeof(SQueryShow));
// pQueryShow = malloc(sizeof(SQueryDesc) * pAcct->acctInfo.numOfQueries + sizeof(SQueryShow));
// pQueryShow->numOfQueries = 0;
// pQueryShow->index = 0;
// pQueryShow->connInfo = NULL;
...
...
@@ -87,7 +87,7 @@ int32_t mgmtGetQueries(SShowObj *pShow, void *pConn) {
// pQueryShow->cdesc = (SCDesc **)malloc(pAcct->acctInfo.numOfQueries * sizeof(SCDesc *));
//
// pConn = pAcct->pConn;
// S
CM
QueryDesc * pQdesc = pQueryShow->qdesc;
// SQueryDesc * pQdesc = pQueryShow->qdesc;
// SCDesc * pCDesc = pQueryShow->connInfo;
// SCDesc **ppCDesc = pQueryShow->cdesc;
//
...
...
@@ -97,7 +97,7 @@ int32_t mgmtGetQueries(SShowObj *pShow, void *pConn) {
// pCDesc->port = pConn->port;
// strcpy(pCDesc->user, pConn->pUser->user);
//
// memcpy(pQdesc, pConn->pQList->qdesc, sizeof(S
CM
QueryDesc) * pConn->pQList->numOfQueries);
// memcpy(pQdesc, pConn->pQList->qdesc, sizeof(SQueryDesc) * pConn->pQList->numOfQueries);
// pQdesc += pConn->pQList->numOfQueries;
// pQueryShow->numOfQueries += pConn->pQList->numOfQueries;
// for (int32_t i = 0; i < pConn->pQList->numOfQueries; ++i, ++ppCDesc) *ppCDesc = pCDesc;
...
...
@@ -193,7 +193,7 @@ int32_t mgmtKillQuery(char *qidstr, void *pConn) {
// while (pConn) {
// if (pConn->ip == ip && pConn->port == port && pConn->pQList) {
// int32_t i;
// S
CM
QueryDesc *pQDesc = pConn->pQList->qdesc;
// SQueryDesc *pQDesc = pConn->pQList->qdesc;
// for (i = 0; i < pConn->pQList->numOfQueries; ++i, ++pQDesc) {
// if (pQDesc->queryId == queryId) break;
// }
...
...
@@ -229,7 +229,7 @@ int32_t mgmtRetrieveQueries(SShowObj *pShow, char *data, int32_t rows, void *pCo
if
(
rows
>
pQueryShow
->
numOfQueries
-
pQueryShow
->
index
)
rows
=
pQueryShow
->
numOfQueries
-
pQueryShow
->
index
;
while
(
numOfRows
<
rows
)
{
S
CM
QueryDesc
*
pNode
=
pQueryShow
->
qdesc
+
pQueryShow
->
index
;
SQueryDesc
*
pNode
=
pQueryShow
->
qdesc
+
pQueryShow
->
index
;
SCDesc
*
pCDesc
=
pQueryShow
->
cdesc
[
pQueryShow
->
index
];
cols
=
0
;
...
...
@@ -275,7 +275,7 @@ int32_t mgmtGetStreams(SShowObj *pShow, void *pConn) {
//
// pthread_mutex_lock(&pAcct->mutex);
//
// pStreamShow = malloc(sizeof(S
CM
StreamDesc) * pAcct->acctInfo.numOfStreams + sizeof(SQueryShow));
// pStreamShow = malloc(sizeof(SStreamDesc) * pAcct->acctInfo.numOfStreams + sizeof(SQueryShow));
// pStreamShow->numOfStreams = 0;
// pStreamShow->index = 0;
// pStreamShow->connInfo = NULL;
...
...
@@ -286,7 +286,7 @@ int32_t mgmtGetStreams(SShowObj *pShow, void *pConn) {
// pStreamShow->cdesc = (SCDesc **)malloc(pAcct->acctInfo.numOfStreams * sizeof(SCDesc *));
//
// pConn = pAcct->pConn;
// S
CM
StreamDesc * pSdesc = pStreamShow->sdesc;
// SStreamDesc * pSdesc = pStreamShow->sdesc;
// SCDesc * pCDesc = pStreamShow->connInfo;
// SCDesc **ppCDesc = pStreamShow->cdesc;
//
...
...
@@ -296,7 +296,7 @@ int32_t mgmtGetStreams(SShowObj *pShow, void *pConn) {
// pCDesc->port = pConn->port;
// strcpy(pCDesc->user, pConn->pUser->user);
//
// memcpy(pSdesc, pConn->pSList->sdesc, sizeof(S
CM
StreamDesc) * pConn->pSList->numOfStreams);
// memcpy(pSdesc, pConn->pSList->sdesc, sizeof(SStreamDesc) * pConn->pSList->numOfStreams);
// pSdesc += pConn->pSList->numOfStreams;
// pStreamShow->numOfStreams += pConn->pSList->numOfStreams;
// for (int32_t i = 0; i < pConn->pSList->numOfStreams; ++i, ++ppCDesc) *ppCDesc = pCDesc;
...
...
@@ -386,7 +386,7 @@ int32_t mgmtRetrieveStreams(SShowObj *pShow, char *data, int32_t rows, void *pCo
if
(
rows
>
pStreamShow
->
numOfStreams
-
pStreamShow
->
index
)
rows
=
pStreamShow
->
numOfStreams
-
pStreamShow
->
index
;
while
(
numOfRows
<
rows
)
{
S
CM
StreamDesc
*
pNode
=
pStreamShow
->
sdesc
+
pStreamShow
->
index
;
SStreamDesc
*
pNode
=
pStreamShow
->
sdesc
+
pStreamShow
->
index
;
SCDesc
*
pCDesc
=
pStreamShow
->
cdesc
[
pStreamShow
->
index
];
cols
=
0
;
...
...
@@ -461,7 +461,7 @@ int32_t mgmtKillStream(char *qidstr, void *pConn) {
// while (pConn) {
// if (pConn->ip == ip && pConn->port == port && pConn->pSList) {
// int32_t i;
// S
CM
StreamDesc *pSDesc = pConn->pSList->sdesc;
// SStreamDesc *pSDesc = pConn->pSList->sdesc;
// for (i = 0; i < pConn->pSList->numOfStreams; ++i, ++pSDesc) {
// if (pSDesc->streamId == streamId) break;
// }
...
...
src/mnode/src/mgmtShell.c
浏览文件 @
cee2e18b
...
...
@@ -15,7 +15,11 @@
#define _DEFAULT_SOURCE
#include "os.h"
#include "taosmsg.h"
#include "tlog.h"
#include "trpc.h"
#include "tstatus.h"
#include "tsched.h"
#include "dnodeSystem.h"
#include "mnode.h"
#include "mgmtAcct.h"
...
...
@@ -30,11 +34,6 @@
#include "mgmtTable.h"
#include "mgmtUser.h"
#include "mgmtVgroup.h"
#include "taosmsg.h"
#include "tlog.h"
#include "tstatus.h"
#include "tsched.h"
#include "trpc.h"
#define MAX_LEN_OF_METER_META (sizeof(SMultiMeterMeta) + sizeof(SSchema) * TSDB_MAX_COLUMNS + sizeof(SSchema) * TSDB_MAX_TAGS + TSDB_MAX_TAGS_LEN)
...
...
@@ -634,196 +633,190 @@ int32_t mgmtProcessKillConnectionMsg(void *pCont, int32_t contLen, void *ahandle
}
int32_t
mgmtProcessCreateUserMsg
(
void
*
pCont
,
int32_t
contLen
,
void
*
ahandle
)
{
// SCMCreateUserMsg *pCreate = (SCMCreateUserMsg *)pMsg;
// int32_t code = 0;
//
// if (mgmtCheckRedirectMsg(pConn, TSDB_MSG_TYPE_CREATE_USER_RSP) != 0) {
// return 0;
// }
//
// if (pConn->superAuth) {
// code = mgmtCreateUser(pConn->pAcct, pCreate->user, pCreate->pass);
// if (code == TSDB_CODE_SUCCESS) {
// mLPrint("user:%s is created by %s", pCreate->user, pConn->pUser->user);
// }
// } else {
// code = TSDB_CODE_NO_RIGHTS;
// }
//
// taosSendSimpleRsp(pConn->thandle, TSDB_MSG_TYPE_CREATE_USER_RSP, code);
if
(
mgmtCheckRedirectMsg
(
ahandle
)
!=
0
)
{
return
TSDB_CODE_REDIRECT
;
}
return
0
;
SUserObj
*
pUser
=
mgmtGetUserFromConn
(
ahandle
);
if
(
pUser
==
NULL
)
{
rpcSendResponse
(
ahandle
,
TSDB_CODE_INVALID_USER
,
NULL
,
0
);
return
TSDB_CODE_INVALID_USER
;
}
int32_t
code
;
if
(
pUser
->
superAuth
)
{
SCreateUserMsg
*
pCreate
=
pCont
;
code
=
mgmtCreateUser
(
pUser
->
pAcct
,
pCreate
->
user
,
pCreate
->
pass
);
if
(
code
==
TSDB_CODE_SUCCESS
)
{
mLPrint
(
"user:%s is created by %s"
,
pCreate
->
user
,
pUser
->
user
);
}
}
else
{
code
=
TSDB_CODE_NO_RIGHTS
;
}
rpcSendResponse
(
ahandle
,
code
,
NULL
,
0
);
return
code
;
}
int32_t
mgmtProcessAlterUserMsg
(
void
*
pCont
,
int32_t
contLen
,
void
*
ahandle
)
{
// SCMAlterUserMsg *pAlter = (SCMAlterUserMsg *)pMsg;
// int32_t code = 0;
// SUserObj * pUser;
// SUserObj * pOperUser;
//
// if (mgmtCheckRedirectMsg(pConn, TSDB_MSG_TYPE_ALTER_USER_RSP) != 0) {
// return 0;
// }
//
// pUser = mgmtGetUser(pAlter->user);
// pOperUser = mgmtGetUser(pConn->pUser->user);
//
// if (pUser == NULL) {
// taosSendSimpleRsp(pConn->thandle, TSDB_MSG_TYPE_ALTER_USER_RSP, TSDB_CODE_INVALID_USER);
// return 0;
// }
//
// if (pOperUser == NULL) {
// taosSendSimpleRsp(pConn->thandle, TSDB_MSG_TYPE_ALTER_USER_RSP, TSDB_CODE_INVALID_USER);
// return 0;
// }
//
// if (strcmp(pUser->user, "monitor") == 0 || (strcmp(pUser->user + 1, pUser->acct) == 0 && pUser->user[0] == '_')) {
// code = TSDB_CODE_NO_RIGHTS;
// taosSendSimpleRsp(pConn->thandle, TSDB_MSG_TYPE_ALTER_USER_RSP, code);
// return 0;
// }
//
// if ((pAlter->flag & TSDB_ALTER_USER_PASSWD) != 0) {
// bool hasRight = false;
// if (strcmp(pOperUser->user, "root") == 0) {
// hasRight = true;
// } else if (strcmp(pUser->user, pOperUser->user) == 0) {
// hasRight = true;
// } else if (pOperUser->superAuth) {
// if (strcmp(pUser->user, "root") == 0) {
// hasRight = false;
// } else if (strcmp(pOperUser->acct, pUser->acct) != 0) {
// hasRight = false;
// } else {
// hasRight = true;
// }
// }
//
// if (hasRight) {
// memset(pUser->pass, 0, sizeof(pUser->pass));
// taosEncryptPass((uint8_t*)pAlter->pass, strlen(pAlter->pass), pUser->pass);
// code = mgmtUpdateUser(pUser);
// mLPrint("user:%s password is altered by %s, code:%d", pAlter->user, pConn->pUser->user, code);
// } else {
// code = TSDB_CODE_NO_RIGHTS;
// }
//
// taosSendSimpleRsp(pConn->thandle, TSDB_MSG_TYPE_ALTER_USER_RSP, code);
// return 0;
// }
//
// if ((pAlter->flag & TSDB_ALTER_USER_PRIVILEGES) != 0) {
// bool hasRight = false;
//
// if (strcmp(pUser->user, "root") == 0) {
// hasRight = false;
// } else if (strcmp(pUser->user, pUser->acct) == 0) {
// hasRight = false;
// } else if (strcmp(pOperUser->user, "root") == 0) {
// hasRight = true;
// } else if (strcmp(pUser->user, pOperUser->user) == 0) {
// hasRight = false;
// } else if (pOperUser->superAuth) {
// if (strcmp(pUser->user, "root") == 0) {
// hasRight = false;
// } else if (strcmp(pOperUser->acct, pUser->acct) != 0) {
// hasRight = false;
// } else {
// hasRight = true;
// }
// }
//
// if (pAlter->privilege == 1) { // super
// hasRight = false;
// }
//
// if (hasRight) {
// //if (pAlter->privilege == 1) { // super
// // pUser->superAuth = 1;
// // pUser->writeAuth = 1;
// //}
// if (pAlter->privilege == 2) { // read
// pUser->superAuth = 0;
// pUser->writeAuth = 0;
// }
// if (pAlter->privilege == 3) { // write
// pUser->superAuth = 0;
// pUser->writeAuth = 1;
// }
//
// code = mgmtUpdateUser(pUser);
// mLPrint("user:%s privilege is altered by %s, code:%d", pAlter->user, pConn->pUser->user, code);
// } else {
// code = TSDB_CODE_NO_RIGHTS;
// }
//
// taosSendSimpleRsp(pConn->thandle, TSDB_MSG_TYPE_ALTER_USER_RSP, code);
// return 0;
// }
//
// code = TSDB_CODE_NO_RIGHTS;
// taosSendSimpleRsp(pConn->thandle, TSDB_MSG_TYPE_ALTER_USER_RSP, code);
return
0
;
if
(
mgmtCheckRedirectMsg
(
ahandle
)
!=
0
)
{
return
TSDB_CODE_REDIRECT
;
}
SUserObj
*
pOperUser
=
mgmtGetUserFromConn
(
ahandle
);
if
(
pOperUser
==
NULL
)
{
rpcSendResponse
(
ahandle
,
TSDB_CODE_INVALID_USER
,
NULL
,
0
);
return
TSDB_CODE_INVALID_USER
;
}
SAlterUserMsg
*
pAlter
=
pCont
;
SUserObj
*
pUser
=
mgmtGetUser
(
pAlter
->
user
);
if
(
pUser
==
NULL
)
{
rpcSendResponse
(
ahandle
,
TSDB_CODE_INVALID_USER
,
NULL
,
0
);
return
TSDB_CODE_INVALID_USER
;
}
if
(
strcmp
(
pUser
->
user
,
"monitor"
)
==
0
||
(
strcmp
(
pUser
->
user
+
1
,
pUser
->
acct
)
==
0
&&
pUser
->
user
[
0
]
==
'_'
))
{
rpcSendResponse
(
ahandle
,
TSDB_CODE_NO_RIGHTS
,
NULL
,
0
);
return
TSDB_CODE_NO_RIGHTS
;
}
int
code
;
if
((
pAlter
->
flag
&
TSDB_ALTER_USER_PASSWD
)
!=
0
)
{
bool
hasRight
=
false
;
if
(
strcmp
(
pOperUser
->
user
,
"root"
)
==
0
)
{
hasRight
=
true
;
}
else
if
(
strcmp
(
pUser
->
user
,
pOperUser
->
user
)
==
0
)
{
hasRight
=
true
;
}
else
if
(
pOperUser
->
superAuth
)
{
if
(
strcmp
(
pUser
->
user
,
"root"
)
==
0
)
{
hasRight
=
false
;
}
else
if
(
strcmp
(
pOperUser
->
acct
,
pUser
->
acct
)
!=
0
)
{
hasRight
=
false
;
}
else
{
hasRight
=
true
;
}
}
if
(
hasRight
)
{
memset
(
pUser
->
pass
,
0
,
sizeof
(
pUser
->
pass
));
taosEncryptPass
((
uint8_t
*
)
pAlter
->
pass
,
strlen
(
pAlter
->
pass
),
pUser
->
pass
);
code
=
mgmtUpdateUser
(
pUser
);
mLPrint
(
"user:%s password is altered by %s, code:%d"
,
pAlter
->
user
,
pUser
->
user
,
code
);
}
else
{
code
=
TSDB_CODE_NO_RIGHTS
;
}
rpcSendResponse
(
ahandle
,
code
,
NULL
,
0
);
return
code
;
}
if
((
pAlter
->
flag
&
TSDB_ALTER_USER_PRIVILEGES
)
!=
0
)
{
bool
hasRight
=
false
;
if
(
strcmp
(
pUser
->
user
,
"root"
)
==
0
)
{
hasRight
=
false
;
}
else
if
(
strcmp
(
pUser
->
user
,
pUser
->
acct
)
==
0
)
{
hasRight
=
false
;
}
else
if
(
strcmp
(
pOperUser
->
user
,
"root"
)
==
0
)
{
hasRight
=
true
;
}
else
if
(
strcmp
(
pUser
->
user
,
pOperUser
->
user
)
==
0
)
{
hasRight
=
false
;
}
else
if
(
pOperUser
->
superAuth
)
{
if
(
strcmp
(
pUser
->
user
,
"root"
)
==
0
)
{
hasRight
=
false
;
}
else
if
(
strcmp
(
pOperUser
->
acct
,
pUser
->
acct
)
!=
0
)
{
hasRight
=
false
;
}
else
{
hasRight
=
true
;
}
}
if
(
pAlter
->
privilege
==
1
)
{
// super
hasRight
=
false
;
}
if
(
hasRight
)
{
//if (pAlter->privilege == 1) { // super
// pUser->superAuth = 1;
// pUser->writeAuth = 1;
//}
if
(
pAlter
->
privilege
==
2
)
{
// read
pUser
->
superAuth
=
0
;
pUser
->
writeAuth
=
0
;
}
if
(
pAlter
->
privilege
==
3
)
{
// write
pUser
->
superAuth
=
0
;
pUser
->
writeAuth
=
1
;
}
code
=
mgmtUpdateUser
(
pUser
);
mLPrint
(
"user:%s privilege is altered by %s, code:%d"
,
pAlter
->
user
,
pUser
->
user
,
code
);
}
else
{
code
=
TSDB_CODE_NO_RIGHTS
;
}
rpcSendResponse
(
ahandle
,
code
,
NULL
,
0
);
return
code
;
}
code
=
TSDB_CODE_NO_RIGHTS
;
rpcSendResponse
(
ahandle
,
code
,
NULL
,
0
);
return
code
;
}
int32_t
mgmtProcessDropUserMsg
(
void
*
pCont
,
int32_t
contLen
,
void
*
ahandle
)
{
// SCMDropUserMsg *pDrop = (SCMDropUserMsg *)pMsg;
// int32_t code = 0;
// SUserObj * pUser;
// SUserObj * pOperUser;
//
// if (mgmtCheckRedirectMsg(pConn, TSDB_MSG_TYPE_DROP_USER_RSP) != 0) {
// return 0;
// }
//
// pUser = mgmtGetUser(pDrop->user);
// pOperUser = mgmtGetUser(pConn->pUser->user);
//
// if (pUser == NULL) {
// taosSendSimpleRsp(pConn->thandle, TSDB_MSG_TYPE_DROP_USER_RSP, TSDB_CODE_INVALID_USER);
// return 0;
// }
//
// if (pOperUser == NULL) {
// taosSendSimpleRsp(pConn->thandle, TSDB_MSG_TYPE_DROP_USER_RSP, TSDB_CODE_INVALID_USER);
// return 0;
// }
//
// if (strcmp(pUser->user, "monitor") == 0 || (strcmp(pUser->user + 1, pUser->acct) == 0 && pUser->user[0] == '_')) {
// code = TSDB_CODE_NO_RIGHTS;
// taosSendSimpleRsp(pConn->thandle, TSDB_MSG_TYPE_DROP_USER_RSP, code);
// return 0;
// }
//
// bool hasRight = false;
// if (strcmp(pUser->user, "root") == 0) {
// hasRight = false;
// } else if (strcmp(pOperUser->user, "root") == 0) {
// hasRight = true;
// } else if (strcmp(pUser->user, pOperUser->user) == 0) {
// hasRight = false;
// } else if (pOperUser->superAuth) {
// if (strcmp(pUser->user, "root") == 0) {
// hasRight = false;
// } else if (strcmp(pOperUser->acct, pUser->acct) != 0) {
// hasRight = false;
// } else {
// hasRight = true;
// }
// }
//
// if (hasRight) {
// code = mgmtDropUser(pConn->pAcct, pDrop->user);
// if (code == 0) {
// mLPrint("user:%s is dropped by %s", pDrop->user, pConn->pUser->user);
// }
// } else {
// code = TSDB_CODE_NO_RIGHTS;
// }
//
// taosSendSimpleRsp(pConn->thandle, TSDB_MSG_TYPE_DROP_USER_RSP, code);
return
0
;
if
(
mgmtCheckRedirectMsg
(
ahandle
)
!=
0
)
{
return
TSDB_CODE_REDIRECT
;
}
SUserObj
*
pOperUser
=
mgmtGetUserFromConn
(
ahandle
);
if
(
pOperUser
==
NULL
)
{
rpcSendResponse
(
ahandle
,
TSDB_CODE_INVALID_USER
,
NULL
,
0
);
return
TSDB_CODE_INVALID_USER
;
}
SDropUserMsg
*
pDrop
=
pCont
;
SUserObj
*
pUser
=
mgmtGetUser
(
pDrop
->
user
);
if
(
pUser
==
NULL
)
{
rpcSendResponse
(
ahandle
,
TSDB_CODE_INVALID_USER
,
NULL
,
0
);
return
TSDB_CODE_INVALID_USER
;
}
if
(
strcmp
(
pUser
->
user
,
"monitor"
)
==
0
||
(
strcmp
(
pUser
->
user
+
1
,
pUser
->
acct
)
==
0
&&
pUser
->
user
[
0
]
==
'_'
))
{
rpcSendResponse
(
ahandle
,
TSDB_CODE_NO_RIGHTS
,
NULL
,
0
);
return
TSDB_CODE_NO_RIGHTS
;
}
bool
hasRight
=
false
;
if
(
strcmp
(
pUser
->
user
,
"root"
)
==
0
)
{
hasRight
=
false
;
}
else
if
(
strcmp
(
pOperUser
->
user
,
"root"
)
==
0
)
{
hasRight
=
true
;
}
else
if
(
strcmp
(
pUser
->
user
,
pOperUser
->
user
)
==
0
)
{
hasRight
=
false
;
}
else
if
(
pOperUser
->
superAuth
)
{
if
(
strcmp
(
pUser
->
user
,
"root"
)
==
0
)
{
hasRight
=
false
;
}
else
if
(
strcmp
(
pOperUser
->
acct
,
pUser
->
acct
)
!=
0
)
{
hasRight
=
false
;
}
else
{
hasRight
=
true
;
}
}
int32_t
code
;
if
(
hasRight
)
{
code
=
mgmtDropUser
(
pUser
->
pAcct
,
pDrop
->
user
);
if
(
code
==
TSDB_CODE_SUCCESS
)
{
mLPrint
(
"user:%s is dropped by %s"
,
pDrop
->
user
,
pUser
->
user
);
}
}
else
{
code
=
TSDB_CODE_NO_RIGHTS
;
}
rpcSendResponse
(
ahandle
,
code
,
NULL
,
0
);
return
code
;
}
int32_t
mgmtProcessDropDbMsg
(
void
*
pCont
,
int32_t
contLen
,
void
*
ahandle
)
{
...
...
@@ -1188,10 +1181,10 @@ int32_t mgmtProcessCfgDnodeMsg(void *pCont, int32_t contLen, void *ahandle) {
}
int32_t
mgmtProcessHeartBeatMsg
(
void
*
pCont
,
int32_t
contLen
,
void
*
ahandle
)
{
S
CMHeartBeatMsg
*
pHBMsg
=
(
SCM
HeartBeatMsg
*
)
pCont
;
S
HeartBeatMsg
*
pHBMsg
=
(
S
HeartBeatMsg
*
)
pCont
;
mgmtSaveQueryStreamList
(
pHBMsg
);
S
CMHeartBeatRsp
*
pHBRsp
=
(
SCM
HeartBeatRsp
*
)
rpcMallocCont
(
contLen
);
S
HeartBeatRsp
*
pHBRsp
=
(
S
HeartBeatRsp
*
)
rpcMallocCont
(
contLen
);
if
(
pHBRsp
==
NULL
)
{
rpcSendResponse
(
ahandle
,
TSDB_CODE_SERV_OUT_OF_MEMORY
,
NULL
,
0
);
rpcFreeCont
(
pCont
);
...
...
@@ -1225,9 +1218,7 @@ int32_t mgmtProcessHeartBeatMsg(void *pCont, int32_t contLen, void *ahandle) {
pHBRsp
->
streamId
=
0
;
pHBRsp
->
killConnection
=
0
;
rpcSendResponse
(
ahandle
,
TSDB_CODE_SUCCESS
,
pHBRsp
,
sizeof
(
SCMHeartBeatMsg
));
rpcFreeCont
(
pCont
);
rpcSendResponse
(
ahandle
,
TSDB_CODE_SUCCESS
,
pHBRsp
,
sizeof
(
SHeartBeatMsg
));
return
TSDB_CODE_SUCCESS
;
}
...
...
@@ -1247,7 +1238,7 @@ int32_t mgmtRetriveUserAuthInfo(char *user, char *spi, char *encrypt, char *secr
}
static
int32_t
mgmtProcessConnectMsg
(
void
*
pCont
,
int32_t
contLen
,
void
*
thandle
)
{
SC
MConnectMsg
*
pConnectMsg
=
(
SCM
ConnectMsg
*
)
pCont
;
SC
onnectMsg
*
pConnectMsg
=
(
S
ConnectMsg
*
)
pCont
;
SRpcConnInfo
connInfo
;
rpcGetConnInfo
(
thandle
,
&
connInfo
);
int32_t
code
;
...
...
@@ -1284,7 +1275,7 @@ static int32_t mgmtProcessConnectMsg(void *pCont, int32_t contLen, void *thandle
}
}
SC
MConnectRsp
*
pConnectRsp
=
rpcMallocCont
(
sizeof
(
SCM
ConnectRsp
));
SC
onnectRsp
*
pConnectRsp
=
rpcMallocCont
(
sizeof
(
S
ConnectRsp
));
if
(
pConnectRsp
==
NULL
)
{
code
=
TSDB_CODE_SERV_OUT_OF_MEMORY
;
goto
connect_over
;
...
...
@@ -1316,7 +1307,7 @@ connect_over:
rpcSendResponse
(
thandle
,
code
,
NULL
,
0
);
}
else
{
mLPrint
(
"user:%s login from %s, code:%d"
,
connInfo
.
user
,
taosIpStr
(
connInfo
.
clientIp
),
code
);
rpcSendResponse
(
thandle
,
code
,
pConnectRsp
,
sizeof
(
SC
MC
onnectRsp
));
rpcSendResponse
(
thandle
,
code
,
pConnectRsp
,
sizeof
(
SConnectRsp
));
}
return
code
;
...
...
@@ -1404,10 +1395,10 @@ void mgmtInitProcessShellMsg() {
mgmtProcessShellMsg
[
TSDB_MSG_TYPE_KILL_CONNECTION
]
=
mgmtProcessKillConnectionMsg
;
}
int32_t
mgmtCheckRedirectMsgImp
(
void
*
pConn
,
int32_t
msgType
)
{
int32_t
mgmtCheckRedirectMsgImp
(
void
*
pConn
)
{
return
0
;
}
int32_t
(
*
mgmtCheckRedirectMsg
)(
void
*
pConn
,
int32_t
msgType
)
=
mgmtCheckRedirectMsgImp
;
int32_t
(
*
mgmtCheckRedirectMsg
)(
void
*
pConn
)
=
mgmtCheckRedirectMsgImp
;
static
int32_t
mgmtProcessUnSupportMsg
(
void
*
pCont
,
int32_t
contLen
,
void
*
ahandle
)
{
rpcSendResponse
(
ahandle
,
TSDB_CODE_OPS_NOT_SUPPORT
,
NULL
,
0
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录