Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
f04292b8
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1185
Star
22015
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f04292b8
编写于
1月 19, 2022
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[td-11818]remove SParseBasicCtx
上级
f1e7dade
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
36 addition
and
7 deletion
+36
-7
source/client/inc/clientInt.h
source/client/inc/clientInt.h
+1
-1
source/client/src/clientImpl.c
source/client/src/clientImpl.c
+24
-4
source/client/src/clientMsgHandler.c
source/client/src/clientMsgHandler.c
+1
-1
source/libs/parser/src/dCDAstProcess.c
source/libs/parser/src/dCDAstProcess.c
+9
-0
source/util/src/tconfig.c
source/util/src/tconfig.c
+1
-1
未找到文件。
source/client/inc/clientInt.h
浏览文件 @
f04292b8
...
...
@@ -179,7 +179,7 @@ extern int32_t clientConnRefPool;
extern
int
(
*
handleRequestRspFp
[
TDMT_MAX
])(
void
*
,
const
SDataBuf
*
pMsg
,
int32_t
code
);
int
genericRspCallback
(
void
*
param
,
const
SDataBuf
*
pMsg
,
int32_t
code
);
SMsgSendInfo
*
buildMsgInfoImpl
(
SRequestObj
*
);
SMsgSendInfo
*
buildMsgInfoImpl
(
SRequestObj
*
pReqObj
);
int
taos_init
();
...
...
source/client/src/clientImpl.c
浏览文件 @
f04292b8
...
...
@@ -195,8 +195,7 @@ int32_t execDdlQuery(SRequestObj* pRequest, SQueryNode* pQuery) {
}
asyncSendMsgToServer
(
pTscObj
->
pAppInfo
->
pTransporter
,
&
pDcl
->
epSet
,
&
transporterId
,
pSendMsg
);
}
else
{
SEpSet
*
pEpSet
=
&
pTscObj
->
pAppInfo
->
mgmtEp
.
epSet
;
asyncSendMsgToServer
(
pTscObj
->
pAppInfo
->
pTransporter
,
pEpSet
,
&
transporterId
,
pSendMsg
);
asyncSendMsgToServer
(
pTscObj
->
pAppInfo
->
pTransporter
,
&
pDcl
->
epSet
,
&
transporterId
,
pSendMsg
);
}
tsem_wait
(
&
pRequest
->
body
.
rspSem
);
...
...
@@ -706,6 +705,8 @@ void* doFetchRow(SRequestObj* pRequest) {
assert
(
pRequest
!=
NULL
);
SReqResultInfo
*
pResultInfo
=
&
pRequest
->
body
.
resInfo
;
SEpSet
epSet
=
{
0
};
if
(
pResultInfo
->
pData
==
NULL
||
pResultInfo
->
current
>=
pResultInfo
->
numOfRows
)
{
if
(
pRequest
->
type
==
TDMT_VND_QUERY
)
{
// All data has returned to App already, no need to try again
...
...
@@ -729,6 +730,17 @@ void* doFetchRow(SRequestObj* pRequest) {
pRequest
->
type
=
TDMT_MND_SHOW_RETRIEVE
;
}
else
if
(
pRequest
->
type
==
TDMT_VND_SHOW_TABLES
)
{
pRequest
->
type
=
TDMT_VND_SHOW_TABLES_FETCH
;
SShowReqInfo
*
pShowReqInfo
=
&
pRequest
->
body
.
showInfo
;
SVgroupInfo
*
pVgroupInfo
=
taosArrayGet
(
pShowReqInfo
->
pArray
,
pShowReqInfo
->
currentIndex
);
epSet
.
numOfEps
=
pVgroupInfo
->
numOfEps
;
epSet
.
inUse
=
pVgroupInfo
->
inUse
;
for
(
int32_t
i
=
0
;
i
<
epSet
.
numOfEps
;
++
i
)
{
strncpy
(
epSet
.
fqdn
[
i
],
pVgroupInfo
->
epAddr
[
i
].
fqdn
,
tListLen
(
epSet
.
fqdn
[
i
]));
epSet
.
port
[
i
]
=
pVgroupInfo
->
epAddr
[
i
].
port
;
}
}
else
if
(
pRequest
->
type
==
TDMT_VND_SHOW_TABLES_FETCH
)
{
pRequest
->
type
=
TDMT_VND_SHOW_TABLES
;
SShowReqInfo
*
pShowReqInfo
=
&
pRequest
->
body
.
showInfo
;
...
...
@@ -746,9 +758,17 @@ void* doFetchRow(SRequestObj* pRequest) {
SMsgSendInfo
*
body
=
buildMsgInfoImpl
(
pRequest
);
epSet
.
numOfEps
=
pVgroupInfo
->
numOfEps
;
epSet
.
inUse
=
pVgroupInfo
->
inUse
;
for
(
int32_t
i
=
0
;
i
<
epSet
.
numOfEps
;
++
i
)
{
strncpy
(
epSet
.
fqdn
[
i
],
pVgroupInfo
->
epAddr
[
i
].
fqdn
,
tListLen
(
epSet
.
fqdn
[
i
]));
epSet
.
port
[
i
]
=
pVgroupInfo
->
epAddr
[
i
].
port
;
}
int64_t
transporterId
=
0
;
STscObj
*
pTscObj
=
pRequest
->
pTscObj
;
asyncSendMsgToServer
(
pTscObj
->
pAppInfo
->
pTransporter
,
&
pTscObj
->
pAppInfo
->
mgmtEp
.
epSet
,
&
transporterId
,
body
);
asyncSendMsgToServer
(
pTscObj
->
pAppInfo
->
pTransporter
,
&
epSet
,
&
transporterId
,
body
);
tsem_wait
(
&
pRequest
->
body
.
rspSem
);
pRequest
->
type
=
TDMT_VND_SHOW_TABLES_FETCH
;
...
...
@@ -758,7 +778,7 @@ void* doFetchRow(SRequestObj* pRequest) {
int64_t
transporterId
=
0
;
STscObj
*
pTscObj
=
pRequest
->
pTscObj
;
asyncSendMsgToServer
(
pTscObj
->
pAppInfo
->
pTransporter
,
&
pTscObj
->
pAppInfo
->
mgmtEp
.
epSet
,
&
transporterId
,
body
);
asyncSendMsgToServer
(
pTscObj
->
pAppInfo
->
pTransporter
,
&
epSet
,
&
transporterId
,
body
);
tsem_wait
(
&
pRequest
->
body
.
rspSem
);
...
...
source/client/src/clientMsgHandler.c
浏览文件 @
f04292b8
...
...
@@ -115,7 +115,7 @@ SMsgSendInfo* buildMsgInfoImpl(SRequestObj *pRequest) {
}
}
else
{
assert
(
pRequest
!=
NULL
);
pMsgSendInfo
->
msgInfo
=
pRequest
->
body
.
requestMsg
;
pMsgSendInfo
->
msgInfo
=
pRequest
->
body
.
requestMsg
;
}
pMsgSendInfo
->
fp
=
(
handleRequestRspFp
[
TMSG_INDEX
(
pRequest
->
type
)]
==
NULL
)
?
genericRspCallback
:
handleRequestRspFp
[
TMSG_INDEX
(
pRequest
->
type
)];
...
...
source/libs/parser/src/dCDAstProcess.c
浏览文件 @
f04292b8
...
...
@@ -768,6 +768,7 @@ SDclStmtInfo* qParserValidateDclSqlNode(SSqlInfo* pInfo, SParseContext* pCtx, ch
pDcl
->
pMsg
=
(
char
*
)
buildUserManipulationMsg
(
pInfo
,
&
pDcl
->
msgLen
,
pCtx
->
requestId
,
msgBuf
,
msgBufLen
);
pDcl
->
msgType
=
(
pInfo
->
type
==
TSDB_SQL_CREATE_USER
)
?
TDMT_MND_CREATE_USER
:
TDMT_MND_ALTER_USER
;
pDcl
->
epSet
=
pCtx
->
mgmtEpSet
;
break
;
}
...
...
@@ -809,6 +810,7 @@ SDclStmtInfo* qParserValidateDclSqlNode(SSqlInfo* pInfo, SParseContext* pCtx, ch
pDcl
->
pMsg
=
(
char
*
)
buildAcctManipulationMsg
(
pInfo
,
&
pDcl
->
msgLen
,
pCtx
->
requestId
,
msgBuf
,
msgBufLen
);
pDcl
->
msgType
=
(
pInfo
->
type
==
TSDB_SQL_CREATE_ACCT
)
?
TDMT_MND_CREATE_ACCT
:
TDMT_MND_ALTER_ACCT
;
pDcl
->
epSet
=
pCtx
->
mgmtEpSet
;
break
;
}
...
...
@@ -816,6 +818,7 @@ SDclStmtInfo* qParserValidateDclSqlNode(SSqlInfo* pInfo, SParseContext* pCtx, ch
case
TSDB_SQL_DROP_USER
:
{
pDcl
->
pMsg
=
(
char
*
)
buildDropUserMsg
(
pInfo
,
&
pDcl
->
msgLen
,
pCtx
->
requestId
,
msgBuf
,
msgBufLen
);
pDcl
->
msgType
=
(
pInfo
->
type
==
TSDB_SQL_DROP_ACCT
)
?
TDMT_MND_DROP_ACCT
:
TDMT_MND_DROP_USER
;
pDcl
->
epSet
=
pCtx
->
mgmtEpSet
;
break
;
}
...
...
@@ -852,6 +855,7 @@ SDclStmtInfo* qParserValidateDclSqlNode(SSqlInfo* pInfo, SParseContext* pCtx, ch
pDcl
->
pMsg
=
(
char
*
)
pUseDbMsg
;
pDcl
->
msgLen
=
sizeof
(
SUseDbReq
);
pDcl
->
msgType
=
TDMT_MND_USE_DB
;
pDcl
->
epSet
=
pCtx
->
mgmtEpSet
;
break
;
}
...
...
@@ -880,6 +884,7 @@ SDclStmtInfo* qParserValidateDclSqlNode(SSqlInfo* pInfo, SParseContext* pCtx, ch
goto
_error
;
}
pDcl
->
epSet
=
pCtx
->
mgmtEpSet
;
pDcl
->
pMsg
=
(
char
*
)
pCreateMsg
;
pDcl
->
msgLen
=
sizeof
(
SCreateDbReq
);
pDcl
->
msgType
=
(
pInfo
->
type
==
TSDB_SQL_CREATE_DB
)
?
TDMT_MND_CREATE_DB
:
TDMT_MND_ALTER_DB
;
...
...
@@ -908,6 +913,7 @@ SDclStmtInfo* qParserValidateDclSqlNode(SSqlInfo* pInfo, SParseContext* pCtx, ch
pDcl
->
msgType
=
TDMT_MND_DROP_DB
;
pDcl
->
msgLen
=
sizeof
(
SDropDbReq
);
pDcl
->
pMsg
=
(
char
*
)
pDropDbMsg
;
pDcl
->
epSet
=
pCtx
->
mgmtEpSet
;
break
;
}
...
...
@@ -920,6 +926,7 @@ SDclStmtInfo* qParserValidateDclSqlNode(SSqlInfo* pInfo, SParseContext* pCtx, ch
pDcl
->
pMsg
=
(
char
*
)
buildCreateStbMsg
(
pCreateTable
,
&
pDcl
->
msgLen
,
pCtx
,
pMsgBuf
);
pDcl
->
msgType
=
TDMT_MND_CREATE_STB
;
pDcl
->
epSet
=
pCtx
->
mgmtEpSet
;
break
;
}
...
...
@@ -940,6 +947,7 @@ SDclStmtInfo* qParserValidateDclSqlNode(SSqlInfo* pInfo, SParseContext* pCtx, ch
}
pDcl
->
msgType
=
TDMT_MND_CREATE_DNODE
;
pDcl
->
epSet
=
pCtx
->
mgmtEpSet
;
break
;
}
...
...
@@ -950,6 +958,7 @@ SDclStmtInfo* qParserValidateDclSqlNode(SSqlInfo* pInfo, SParseContext* pCtx, ch
}
pDcl
->
msgType
=
TDMT_MND_DROP_DNODE
;
pDcl
->
epSet
=
pCtx
->
mgmtEpSet
;
break
;
}
...
...
source/util/src/tconfig.c
浏览文件 @
f04292b8
...
...
@@ -16,8 +16,8 @@
#define _DEFAULT_SOURCE
#include "os.h"
#include "tconfig.h"
#include "ulog.h"
#include "tutil.h"
#include "ulog.h"
SGlobalCfg
tsGlobalConfig
[
TSDB_CFG_MAX_NUM
]
=
{{
0
}};
int32_t
tsGlobalConfigNum
=
0
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录