Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
9673e0ed
T
TDengine
项目概览
taosdata
/
TDengine
接近 2 年 前同步成功
通知
1191
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看板
提交
9673e0ed
编写于
12月 15, 2021
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
minor changes
上级
ed68f95c
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
15 addition
and
12 deletion
+15
-12
include/common/taosmsg.h
include/common/taosmsg.h
+11
-5
source/dnode/mnode/impl/inc/mndDef.h
source/dnode/mnode/impl/inc/mndDef.h
+1
-2
source/dnode/mnode/impl/src/mndDb.c
source/dnode/mnode/impl/src/mndDb.c
+1
-1
source/dnode/mnode/impl/src/mndDnode.c
source/dnode/mnode/impl/src/mndDnode.c
+1
-0
source/dnode/mnode/impl/src/mndUser.c
source/dnode/mnode/impl/src/mndUser.c
+1
-4
未找到文件。
include/common/taosmsg.h
浏览文件 @
9673e0ed
...
@@ -389,17 +389,20 @@ typedef struct {
...
@@ -389,17 +389,20 @@ typedef struct {
int32_t
maxDbs
;
int32_t
maxDbs
;
int32_t
maxTimeSeries
;
int32_t
maxTimeSeries
;
int32_t
maxStreams
;
int32_t
maxStreams
;
int64_t
maxStorage
;
// In unit of GB
int32_t
accessState
;
// Configured only by command
int32_t
accessState
;
// Configured only by command
int64_t
maxStorage
;
// In unit of GB
int32_t
reserve
[
8
];
}
SCreateAcctMsg
,
SAlterAcctMsg
;
}
SCreateAcctMsg
,
SAlterAcctMsg
;
typedef
struct
{
typedef
struct
{
char
user
[
TSDB_USER_LEN
];
char
user
[
TSDB_USER_LEN
];
int32_t
reserve
[
8
];
}
SDropUserMsg
,
SDropAcctMsg
;
}
SDropUserMsg
,
SDropAcctMsg
;
typedef
struct
{
typedef
struct
{
char
user
[
TSDB_USER_LEN
];
char
user
[
TSDB_USER_LEN
];
char
pass
[
TSDB_PASSWORD_LEN
];
char
pass
[
TSDB_PASSWORD_LEN
];
int32_t
reserve
[
8
];
}
SCreateUserMsg
,
SAlterUserMsg
;
}
SCreateUserMsg
,
SAlterUserMsg
;
typedef
struct
{
typedef
struct
{
...
@@ -876,16 +879,19 @@ typedef struct SShowRsp {
...
@@ -876,16 +879,19 @@ typedef struct SShowRsp {
}
SShowRsp
;
}
SShowRsp
;
typedef
struct
{
typedef
struct
{
char
ep
[
TSDB_EP_LEN
];
// end point, hostname:port
char
ep
[
TSDB_EP_LEN
];
// end point, hostname:port
int32_t
reserve
[
8
];
}
SCreateDnodeMsg
;
}
SCreateDnodeMsg
;
typedef
struct
{
typedef
struct
{
int32_t
dnodeId
;
int32_t
dnodeId
;
int32_t
reserve
[
8
];
}
SDropDnodeMsg
;
}
SDropDnodeMsg
;
typedef
struct
{
typedef
struct
{
int32_t
dnodeId
;
int32_t
dnodeId
;
char
config
[
TSDB_DNODE_CONFIG_LEN
];
char
config
[
TSDB_DNODE_CONFIG_LEN
];
int32_t
reserve
[
8
];
}
SCfgDnodeMsg
;
}
SCfgDnodeMsg
;
typedef
struct
{
typedef
struct
{
...
...
source/dnode/mnode/impl/inc/mndDef.h
浏览文件 @
9673e0ed
...
@@ -45,7 +45,6 @@ extern int32_t mDebugFlag;
...
@@ -45,7 +45,6 @@ extern int32_t mDebugFlag;
typedef
struct
SClusterObj
SClusterObj
;
typedef
struct
SClusterObj
SClusterObj
;
typedef
struct
SMnodeObj
SMnodeObj
;
typedef
struct
SMnodeObj
SMnodeObj
;
typedef
struct
SAcctObj
SAcctObj
;
typedef
struct
SAcctObj
SAcctObj
;
typedef
struct
SDbObj
SDbObj
;
typedef
struct
SVgObj
SVgObj
;
typedef
struct
SVgObj
SVgObj
;
typedef
struct
SFuncObj
SFuncObj
;
typedef
struct
SFuncObj
SFuncObj
;
typedef
struct
SOperObj
SOperObj
;
typedef
struct
SOperObj
SOperObj
;
...
@@ -209,7 +208,7 @@ typedef struct {
...
@@ -209,7 +208,7 @@ typedef struct {
int8_t
cacheLastRow
;
int8_t
cacheLastRow
;
}
SDbCfg
;
}
SDbCfg
;
typedef
struct
SDbObj
{
typedef
struct
{
char
name
[
TSDB_FULL_DB_NAME_LEN
];
char
name
[
TSDB_FULL_DB_NAME_LEN
];
char
acct
[
TSDB_USER_LEN
];
char
acct
[
TSDB_USER_LEN
];
int64_t
createdTime
;
int64_t
createdTime
;
...
...
source/dnode/mnode/impl/src/mndDb.c
浏览文件 @
9673e0ed
...
@@ -300,7 +300,7 @@ static int32_t mndCreateDb(SMnode *pMnode, SMnodeMsg *pMsg, SCreateDbMsg *pCreat
...
@@ -300,7 +300,7 @@ static int32_t mndCreateDb(SMnode *pMnode, SMnodeMsg *pMsg, SCreateDbMsg *pCreat
tstrncpy
(
dbObj
.
acct
,
acct
,
TSDB_USER_LEN
);
tstrncpy
(
dbObj
.
acct
,
acct
,
TSDB_USER_LEN
);
dbObj
.
createdTime
=
taosGetTimestampMs
();
dbObj
.
createdTime
=
taosGetTimestampMs
();
dbObj
.
updateTime
=
dbObj
.
createdTime
;
dbObj
.
updateTime
=
dbObj
.
createdTime
;
dbObj
.
uid
=
1234
;
dbObj
.
uid
=
mndGenerateUid
(
dbObj
.
name
,
TSDB_FULL_DB_NAME_LEN
)
;
dbObj
.
cfg
=
(
SDbCfg
){.
cacheBlockSize
=
pCreate
->
cacheBlockSize
,
dbObj
.
cfg
=
(
SDbCfg
){.
cacheBlockSize
=
pCreate
->
cacheBlockSize
,
.
totalBlocks
=
pCreate
->
totalBlocks
,
.
totalBlocks
=
pCreate
->
totalBlocks
,
.
daysPerFile
=
pCreate
->
daysPerFile
,
.
daysPerFile
=
pCreate
->
daysPerFile
,
...
...
source/dnode/mnode/impl/src/mndDnode.c
浏览文件 @
9673e0ed
...
@@ -175,6 +175,7 @@ static int32_t mndDnodeActionDelete(SSdb *pSdb, SDnodeObj *pDnode) {
...
@@ -175,6 +175,7 @@ static int32_t mndDnodeActionDelete(SSdb *pSdb, SDnodeObj *pDnode) {
static
int32_t
mndDnodeActionUpdate
(
SSdb
*
pSdb
,
SDnodeObj
*
pOldDnode
,
SDnodeObj
*
pNewDnode
)
{
static
int32_t
mndDnodeActionUpdate
(
SSdb
*
pSdb
,
SDnodeObj
*
pOldDnode
,
SDnodeObj
*
pNewDnode
)
{
mTrace
(
"dnode:%d, perform update action"
,
pOldDnode
->
id
);
mTrace
(
"dnode:%d, perform update action"
,
pOldDnode
->
id
);
pOldDnode
->
updateTime
=
pNewDnode
->
updateTime
;
return
0
;
return
0
;
}
}
...
...
source/dnode/mnode/impl/src/mndUser.c
浏览文件 @
9673e0ed
...
@@ -169,12 +169,8 @@ static int32_t mndUserActionDelete(SSdb *pSdb, SUserObj *pUser) {
...
@@ -169,12 +169,8 @@ static int32_t mndUserActionDelete(SSdb *pSdb, SUserObj *pUser) {
static
int32_t
mndUserActionUpdate
(
SSdb
*
pSdb
,
SUserObj
*
pOldUser
,
SUserObj
*
pNewUser
)
{
static
int32_t
mndUserActionUpdate
(
SSdb
*
pSdb
,
SUserObj
*
pOldUser
,
SUserObj
*
pNewUser
)
{
mTrace
(
"user:%s, perform update action"
,
pOldUser
->
user
);
mTrace
(
"user:%s, perform update action"
,
pOldUser
->
user
);
memcpy
(
pOldUser
->
user
,
pNewUser
->
user
,
TSDB_USER_LEN
);
memcpy
(
pOldUser
->
pass
,
pNewUser
->
pass
,
TSDB_PASSWORD_LEN
);
memcpy
(
pOldUser
->
pass
,
pNewUser
->
pass
,
TSDB_PASSWORD_LEN
);
memcpy
(
pOldUser
->
acct
,
pNewUser
->
acct
,
TSDB_USER_LEN
);
pOldUser
->
createdTime
=
pNewUser
->
createdTime
;
pOldUser
->
updateTime
=
pNewUser
->
updateTime
;
pOldUser
->
updateTime
=
pNewUser
->
updateTime
;
pOldUser
->
superUser
=
pNewUser
->
superUser
;
return
0
;
return
0
;
}
}
...
@@ -328,6 +324,7 @@ static int32_t mndProcessAlterUserMsg(SMnodeMsg *pMsg) {
...
@@ -328,6 +324,7 @@ static int32_t mndProcessAlterUserMsg(SMnodeMsg *pMsg) {
memcpy
(
&
newUser
,
pUser
,
sizeof
(
SUserObj
));
memcpy
(
&
newUser
,
pUser
,
sizeof
(
SUserObj
));
memset
(
pUser
->
pass
,
0
,
sizeof
(
pUser
->
pass
));
memset
(
pUser
->
pass
,
0
,
sizeof
(
pUser
->
pass
));
taosEncryptPass
((
uint8_t
*
)
pAlter
->
pass
,
strlen
(
pAlter
->
pass
),
pUser
->
pass
);
taosEncryptPass
((
uint8_t
*
)
pAlter
->
pass
,
strlen
(
pAlter
->
pass
),
pUser
->
pass
);
newUser
.
updateTime
=
taosGetTimestampMs
();
int32_t
code
=
mndUpdateUser
(
pMnode
,
pUser
,
&
newUser
,
pMsg
);
int32_t
code
=
mndUpdateUser
(
pMnode
,
pUser
,
&
newUser
,
pMsg
);
sdbRelease
(
pMnode
->
pSdb
,
pOperUser
);
sdbRelease
(
pMnode
->
pSdb
,
pOperUser
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录