Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
CSDN产品汪
TDengine
提交
50eca0e2
T
TDengine
项目概览
CSDN产品汪
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
5
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
50eca0e2
编写于
6月 12, 2020
作者:
H
Hongze Cheng
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop' into feature/2.0tsdb
上级
bc08ec28
e6817376
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
25 addition
and
13 deletion
+25
-13
src/client/src/tscLocal.c
src/client/src/tscLocal.c
+2
-1
src/client/src/tscServer.c
src/client/src/tscServer.c
+3
-2
src/mnode/src/mnodeProfile.c
src/mnode/src/mnodeProfile.c
+12
-6
src/mnode/src/mnodeTable.c
src/mnode/src/mnodeTable.c
+2
-1
src/mnode/src/mnodeUser.c
src/mnode/src/mnodeUser.c
+2
-1
src/plugins/http/src/httpAuth.c
src/plugins/http/src/httpAuth.c
+4
-2
未找到文件。
src/client/src/tscLocal.c
浏览文件 @
50eca0e2
...
@@ -279,7 +279,8 @@ static void tscProcessCurrentUser(SSqlObj *pSql) {
...
@@ -279,7 +279,8 @@ static void tscProcessCurrentUser(SSqlObj *pSql) {
pExpr
->
resType
=
TSDB_DATA_TYPE_BINARY
;
pExpr
->
resType
=
TSDB_DATA_TYPE_BINARY
;
char
*
vx
=
calloc
(
1
,
pExpr
->
resBytes
);
char
*
vx
=
calloc
(
1
,
pExpr
->
resBytes
);
STR_WITH_MAXSIZE_TO_VARSTR
(
vx
,
pSql
->
pTscObj
->
user
,
sizeof
(
pSql
->
pTscObj
->
user
));
size_t
size
=
sizeof
(
pSql
->
pTscObj
->
user
);
STR_WITH_MAXSIZE_TO_VARSTR
(
vx
,
pSql
->
pTscObj
->
user
,
size
);
tscSetLocalQueryResult
(
pSql
,
vx
,
pExpr
->
aliasName
,
pExpr
->
resType
,
pExpr
->
resBytes
);
tscSetLocalQueryResult
(
pSql
,
vx
,
pExpr
->
aliasName
,
pExpr
->
resType
,
pExpr
->
resBytes
);
free
(
vx
);
free
(
vx
);
...
...
src/client/src/tscServer.c
浏览文件 @
50eca0e2
...
@@ -1708,8 +1708,9 @@ int tscBuildSTableVgroupMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
...
@@ -1708,8 +1708,9 @@ int tscBuildSTableVgroupMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
for
(
int32_t
i
=
0
;
i
<
pQueryInfo
->
numOfTables
;
++
i
)
{
for
(
int32_t
i
=
0
;
i
<
pQueryInfo
->
numOfTables
;
++
i
)
{
STableMetaInfo
*
pTableMetaInfo
=
tscGetTableMetaInfoFromCmd
(
pCmd
,
pCmd
->
clauseIndex
,
i
);
STableMetaInfo
*
pTableMetaInfo
=
tscGetTableMetaInfoFromCmd
(
pCmd
,
pCmd
->
clauseIndex
,
i
);
tstrncpy
(
pMsg
,
pTableMetaInfo
->
name
,
sizeof
(
pTableMetaInfo
->
name
));
size_t
size
=
sizeof
(
pTableMetaInfo
->
name
);
pMsg
+=
sizeof
(
pTableMetaInfo
->
name
);
tstrncpy
(
pMsg
,
pTableMetaInfo
->
name
,
size
);
pMsg
+=
size
;
}
}
pCmd
->
msgType
=
TSDB_MSG_TYPE_CM_STABLE_VGROUP
;
pCmd
->
msgType
=
TSDB_MSG_TYPE_CM_STABLE_VGROUP
;
...
...
src/mnode/src/mnodeProfile.c
浏览文件 @
50eca0e2
...
@@ -235,12 +235,14 @@ static int32_t mnodeRetrieveConns(SShowObj *pShow, char *data, int32_t rows, voi
...
@@ -235,12 +235,14 @@ static int32_t mnodeRetrieveConns(SShowObj *pShow, char *data, int32_t rows, voi
cols
++
;
cols
++
;
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
STR_WITH_MAXSIZE_TO_VARSTR
(
pWrite
,
pConnObj
->
user
,
sizeof
(
pConnObj
->
user
));
size_t
size
=
sizeof
(
pConnObj
->
user
);
STR_WITH_MAXSIZE_TO_VARSTR
(
pWrite
,
pConnObj
->
user
,
size
);
cols
++
;
cols
++
;
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
snprintf
(
ipStr
,
sizeof
(
ipStr
),
"%s:%u"
,
taosIpStr
(
pConnObj
->
ip
),
pConnObj
->
port
);
snprintf
(
ipStr
,
sizeof
(
ipStr
),
"%s:%u"
,
taosIpStr
(
pConnObj
->
ip
),
pConnObj
->
port
);
STR_WITH_MAXSIZE_TO_VARSTR
(
pWrite
,
ipStr
,
sizeof
(
ipStr
));
size
=
sizeof
(
ipStr
);
STR_WITH_MAXSIZE_TO_VARSTR
(
pWrite
,
ipStr
,
size
);
cols
++
;
cols
++
;
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
...
@@ -358,12 +360,14 @@ static int32_t mnodeRetrieveQueries(SShowObj *pShow, char *data, int32_t rows, v
...
@@ -358,12 +360,14 @@ static int32_t mnodeRetrieveQueries(SShowObj *pShow, char *data, int32_t rows, v
cols
++
;
cols
++
;
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
STR_WITH_MAXSIZE_TO_VARSTR
(
pWrite
,
pConnObj
->
user
,
sizeof
(
pConnObj
->
user
));
size_t
size
=
sizeof
(
pConnObj
->
user
);
STR_WITH_MAXSIZE_TO_VARSTR
(
pWrite
,
pConnObj
->
user
,
size
);
cols
++
;
cols
++
;
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
snprintf
(
ipStr
,
sizeof
(
ipStr
),
"%s:%u"
,
taosIpStr
(
pConnObj
->
ip
),
pConnObj
->
port
);
snprintf
(
ipStr
,
sizeof
(
ipStr
),
"%s:%u"
,
taosIpStr
(
pConnObj
->
ip
),
pConnObj
->
port
);
STR_WITH_MAXSIZE_TO_VARSTR
(
pWrite
,
ipStr
,
sizeof
(
ipStr
));
size
=
sizeof
(
ipStr
);
STR_WITH_MAXSIZE_TO_VARSTR
(
pWrite
,
ipStr
,
size
);
cols
++
;
cols
++
;
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
...
@@ -479,12 +483,14 @@ static int32_t mnodeRetrieveStreams(SShowObj *pShow, char *data, int32_t rows, v
...
@@ -479,12 +483,14 @@ static int32_t mnodeRetrieveStreams(SShowObj *pShow, char *data, int32_t rows, v
cols
++
;
cols
++
;
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
STR_WITH_MAXSIZE_TO_VARSTR
(
pWrite
,
pConnObj
->
user
,
sizeof
(
pConnObj
->
user
));
size_t
size
=
sizeof
(
pConnObj
->
user
);
STR_WITH_MAXSIZE_TO_VARSTR
(
pWrite
,
pConnObj
->
user
,
size
);
cols
++
;
cols
++
;
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
snprintf
(
ipStr
,
sizeof
(
ipStr
),
"%s:%u"
,
taosIpStr
(
pConnObj
->
ip
),
pConnObj
->
port
);
snprintf
(
ipStr
,
sizeof
(
ipStr
),
"%s:%u"
,
taosIpStr
(
pConnObj
->
ip
),
pConnObj
->
port
);
STR_WITH_MAXSIZE_TO_VARSTR
(
pWrite
,
ipStr
,
sizeof
(
ipStr
));
size
=
sizeof
(
ipStr
);
STR_WITH_MAXSIZE_TO_VARSTR
(
pWrite
,
ipStr
,
size
);
cols
++
;
cols
++
;
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
...
...
src/mnode/src/mnodeTable.c
浏览文件 @
50eca0e2
...
@@ -1770,7 +1770,8 @@ static int32_t mnodeAutoCreateChildTable(SMnodeMsg *pMsg) {
...
@@ -1770,7 +1770,8 @@ static int32_t mnodeAutoCreateChildTable(SMnodeMsg *pMsg) {
return
TSDB_CODE_MND_OUT_OF_MEMORY
;
return
TSDB_CODE_MND_OUT_OF_MEMORY
;
}
}
tstrncpy
(
pCreateMsg
->
tableId
,
pInfo
->
tableId
,
sizeof
(
pInfo
->
tableId
));
size_t
size
=
sizeof
(
pInfo
->
tableId
);
tstrncpy
(
pCreateMsg
->
tableId
,
pInfo
->
tableId
,
size
);
tstrncpy
(
pCreateMsg
->
db
,
pMsg
->
pDb
->
name
,
sizeof
(
pCreateMsg
->
db
));
tstrncpy
(
pCreateMsg
->
db
,
pMsg
->
pDb
->
name
,
sizeof
(
pCreateMsg
->
db
));
pCreateMsg
->
igExists
=
1
;
pCreateMsg
->
igExists
=
1
;
pCreateMsg
->
getMeta
=
1
;
pCreateMsg
->
getMeta
=
1
;
...
...
src/mnode/src/mnodeUser.c
浏览文件 @
50eca0e2
...
@@ -315,7 +315,8 @@ static int32_t mnodeRetrieveUsers(SShowObj *pShow, char *data, int32_t rows, voi
...
@@ -315,7 +315,8 @@ static int32_t mnodeRetrieveUsers(SShowObj *pShow, char *data, int32_t rows, voi
cols
=
0
;
cols
=
0
;
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
STR_WITH_MAXSIZE_TO_VARSTR
(
pWrite
,
pUser
->
user
,
sizeof
(
pUser
->
user
));
size_t
size
=
sizeof
(
pUser
->
user
);
STR_WITH_MAXSIZE_TO_VARSTR
(
pWrite
,
pUser
->
user
,
size
);
cols
++
;
cols
++
;
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
...
...
src/plugins/http/src/httpAuth.c
浏览文件 @
50eca0e2
...
@@ -101,8 +101,10 @@ bool httpParseTaosdAuthToken(HttpContext *pContext, char *token, int len) {
...
@@ -101,8 +101,10 @@ bool httpParseTaosdAuthToken(HttpContext *pContext, char *token, int len) {
bool
httpGenTaosdAuthToken
(
HttpContext
*
pContext
,
char
*
token
,
int
maxLen
)
{
bool
httpGenTaosdAuthToken
(
HttpContext
*
pContext
,
char
*
token
,
int
maxLen
)
{
char
buffer
[
sizeof
(
pContext
->
user
)
+
sizeof
(
pContext
->
pass
)]
=
{
0
};
char
buffer
[
sizeof
(
pContext
->
user
)
+
sizeof
(
pContext
->
pass
)]
=
{
0
};
tstrncpy
(
buffer
,
pContext
->
user
,
sizeof
(
pContext
->
user
));
size_t
size
=
sizeof
(
pContext
->
user
);
tstrncpy
(
buffer
+
sizeof
(
pContext
->
user
),
pContext
->
pass
,
sizeof
(
pContext
->
pass
));
tstrncpy
(
buffer
,
pContext
->
user
,
size
);
size
=
sizeof
(
pContext
->
pass
);
tstrncpy
(
buffer
+
sizeof
(
pContext
->
user
),
pContext
->
pass
,
size
);
char
*
encrypt
=
taosDesEncode
(
KEY_DES_4
,
buffer
,
TSDB_USER_LEN
+
TSDB_PASSWORD_LEN
);
char
*
encrypt
=
taosDesEncode
(
KEY_DES_4
,
buffer
,
TSDB_USER_LEN
+
TSDB_PASSWORD_LEN
);
char
*
base64
=
base64_encode
((
const
unsigned
char
*
)
encrypt
,
TSDB_USER_LEN
+
TSDB_PASSWORD_LEN
);
char
*
base64
=
base64_encode
((
const
unsigned
char
*
)
encrypt
,
TSDB_USER_LEN
+
TSDB_PASSWORD_LEN
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录