Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
2d485639
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
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看板
提交
2d485639
编写于
12月 01, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: crash if failed to decode sdb row
上级
9f9e2081
变更
17
隐藏空白更改
内联
并排
Showing
17 changed file
with
101 addition
and
61 deletion
+101
-61
source/dnode/mnode/impl/src/mndAcct.c
source/dnode/mnode/impl/src/mndAcct.c
+5
-3
source/dnode/mnode/impl/src/mndCluster.c
source/dnode/mnode/impl/src/mndCluster.c
+6
-3
source/dnode/mnode/impl/src/mndConsumer.c
source/dnode/mnode/impl/src/mndConsumer.c
+7
-4
source/dnode/mnode/impl/src/mndDb.c
source/dnode/mnode/impl/src/mndDb.c
+5
-3
source/dnode/mnode/impl/src/mndDnode.c
source/dnode/mnode/impl/src/mndDnode.c
+5
-3
source/dnode/mnode/impl/src/mndFunc.c
source/dnode/mnode/impl/src/mndFunc.c
+5
-3
source/dnode/mnode/impl/src/mndMnode.c
source/dnode/mnode/impl/src/mndMnode.c
+5
-3
source/dnode/mnode/impl/src/mndQnode.c
source/dnode/mnode/impl/src/mndQnode.c
+5
-3
source/dnode/mnode/impl/src/mndSma.c
source/dnode/mnode/impl/src/mndSma.c
+5
-3
source/dnode/mnode/impl/src/mndSnode.c
source/dnode/mnode/impl/src/mndSnode.c
+5
-3
source/dnode/mnode/impl/src/mndStb.c
source/dnode/mnode/impl/src/mndStb.c
+10
-6
source/dnode/mnode/impl/src/mndStream.c
source/dnode/mnode/impl/src/mndStream.c
+6
-5
source/dnode/mnode/impl/src/mndSubscribe.c
source/dnode/mnode/impl/src/mndSubscribe.c
+6
-5
source/dnode/mnode/impl/src/mndTopic.c
source/dnode/mnode/impl/src/mndTopic.c
+6
-5
source/dnode/mnode/impl/src/mndUser.c
source/dnode/mnode/impl/src/mndUser.c
+10
-6
source/dnode/mnode/impl/src/mndVgroup.c
source/dnode/mnode/impl/src/mndVgroup.c
+5
-3
tests/script/tsim/user/privilege_db.sim
tests/script/tsim/user/privilege_db.sim
+5
-0
未找到文件。
source/dnode/mnode/impl/src/mndAcct.c
浏览文件 @
2d485639
...
@@ -147,6 +147,8 @@ _OVER:
...
@@ -147,6 +147,8 @@ _OVER:
static
SSdbRow
*
mndAcctActionDecode
(
SSdbRaw
*
pRaw
)
{
static
SSdbRow
*
mndAcctActionDecode
(
SSdbRaw
*
pRaw
)
{
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
SAcctObj
*
pAcct
=
NULL
;
SSdbRow
*
pRow
=
NULL
;
int8_t
sver
=
0
;
int8_t
sver
=
0
;
if
(
sdbGetRawSoftVer
(
pRaw
,
&
sver
)
!=
0
)
goto
_OVER
;
if
(
sdbGetRawSoftVer
(
pRaw
,
&
sver
)
!=
0
)
goto
_OVER
;
...
@@ -156,10 +158,10 @@ static SSdbRow *mndAcctActionDecode(SSdbRaw *pRaw) {
...
@@ -156,10 +158,10 @@ static SSdbRow *mndAcctActionDecode(SSdbRaw *pRaw) {
goto
_OVER
;
goto
_OVER
;
}
}
SSdbRow
*
pRow
=
sdbAllocRow
(
sizeof
(
SAcctObj
));
pRow
=
sdbAllocRow
(
sizeof
(
SAcctObj
));
if
(
pRow
==
NULL
)
goto
_OVER
;
if
(
pRow
==
NULL
)
goto
_OVER
;
SAcctObj
*
pAcct
=
sdbGetRowObj
(
pRow
);
pAcct
=
sdbGetRowObj
(
pRow
);
if
(
pAcct
==
NULL
)
goto
_OVER
;
if
(
pAcct
==
NULL
)
goto
_OVER
;
int32_t
dataPos
=
0
;
int32_t
dataPos
=
0
;
...
@@ -186,7 +188,7 @@ static SSdbRow *mndAcctActionDecode(SSdbRaw *pRaw) {
...
@@ -186,7 +188,7 @@ static SSdbRow *mndAcctActionDecode(SSdbRaw *pRaw) {
_OVER:
_OVER:
if
(
terrno
!=
0
)
{
if
(
terrno
!=
0
)
{
mError
(
"acct:%s, failed to decode from raw:%p since %s"
,
pAcct
->
acct
,
pRaw
,
terrstr
());
mError
(
"acct:%s, failed to decode from raw:%p since %s"
,
pAcct
==
NULL
?
"null"
:
pAcct
->
acct
,
pRaw
,
terrstr
());
taosMemoryFreeClear
(
pRow
);
taosMemoryFreeClear
(
pRow
);
return
NULL
;
return
NULL
;
}
}
...
...
source/dnode/mnode/impl/src/mndCluster.c
浏览文件 @
2d485639
...
@@ -157,6 +157,8 @@ _OVER:
...
@@ -157,6 +157,8 @@ _OVER:
static
SSdbRow
*
mndClusterActionDecode
(
SSdbRaw
*
pRaw
)
{
static
SSdbRow
*
mndClusterActionDecode
(
SSdbRaw
*
pRaw
)
{
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
SClusterObj
*
pCluster
=
NULL
;
SSdbRow
*
pRow
=
NULL
;
int8_t
sver
=
0
;
int8_t
sver
=
0
;
if
(
sdbGetRawSoftVer
(
pRaw
,
&
sver
)
!=
0
)
goto
_OVER
;
if
(
sdbGetRawSoftVer
(
pRaw
,
&
sver
)
!=
0
)
goto
_OVER
;
...
@@ -166,10 +168,10 @@ static SSdbRow *mndClusterActionDecode(SSdbRaw *pRaw) {
...
@@ -166,10 +168,10 @@ static SSdbRow *mndClusterActionDecode(SSdbRaw *pRaw) {
goto
_OVER
;
goto
_OVER
;
}
}
SSdbRow
*
pRow
=
sdbAllocRow
(
sizeof
(
SClusterObj
));
pRow
=
sdbAllocRow
(
sizeof
(
SClusterObj
));
if
(
pRow
==
NULL
)
goto
_OVER
;
if
(
pRow
==
NULL
)
goto
_OVER
;
SClusterObj
*
pCluster
=
sdbGetRowObj
(
pRow
);
pCluster
=
sdbGetRowObj
(
pRow
);
if
(
pCluster
==
NULL
)
goto
_OVER
;
if
(
pCluster
==
NULL
)
goto
_OVER
;
int32_t
dataPos
=
0
;
int32_t
dataPos
=
0
;
...
@@ -184,7 +186,8 @@ static SSdbRow *mndClusterActionDecode(SSdbRaw *pRaw) {
...
@@ -184,7 +186,8 @@ static SSdbRow *mndClusterActionDecode(SSdbRaw *pRaw) {
_OVER:
_OVER:
if
(
terrno
!=
0
)
{
if
(
terrno
!=
0
)
{
mError
(
"cluster:%"
PRId64
", failed to decode from raw:%p since %s"
,
pCluster
->
id
,
pRaw
,
terrstr
());
mError
(
"cluster:%"
PRId64
", failed to decode from raw:%p since %s"
,
pCluster
==
NULL
?
0
:
pCluster
->
id
,
pRaw
,
terrstr
());
taosMemoryFreeClear
(
pRow
);
taosMemoryFreeClear
(
pRow
);
return
NULL
;
return
NULL
;
}
}
...
...
source/dnode/mnode/impl/src/mndConsumer.c
浏览文件 @
2d485639
...
@@ -712,7 +712,9 @@ CM_ENCODE_OVER:
...
@@ -712,7 +712,9 @@ CM_ENCODE_OVER:
SSdbRow
*
mndConsumerActionDecode
(
SSdbRaw
*
pRaw
)
{
SSdbRow
*
mndConsumerActionDecode
(
SSdbRaw
*
pRaw
)
{
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
void
*
buf
=
NULL
;
SSdbRow
*
pRow
=
NULL
;
SMqConsumerObj
*
pConsumer
=
NULL
;
void
*
buf
=
NULL
;
int8_t
sver
=
0
;
int8_t
sver
=
0
;
if
(
sdbGetRawSoftVer
(
pRaw
,
&
sver
)
!=
0
)
goto
CM_DECODE_OVER
;
if
(
sdbGetRawSoftVer
(
pRaw
,
&
sver
)
!=
0
)
goto
CM_DECODE_OVER
;
...
@@ -722,10 +724,10 @@ SSdbRow *mndConsumerActionDecode(SSdbRaw *pRaw) {
...
@@ -722,10 +724,10 @@ SSdbRow *mndConsumerActionDecode(SSdbRaw *pRaw) {
goto
CM_DECODE_OVER
;
goto
CM_DECODE_OVER
;
}
}
SSdbRow
*
pRow
=
sdbAllocRow
(
sizeof
(
SMqConsumerObj
));
pRow
=
sdbAllocRow
(
sizeof
(
SMqConsumerObj
));
if
(
pRow
==
NULL
)
goto
CM_DECODE_OVER
;
if
(
pRow
==
NULL
)
goto
CM_DECODE_OVER
;
SMqConsumerObj
*
pConsumer
=
sdbGetRowObj
(
pRow
);
pConsumer
=
sdbGetRowObj
(
pRow
);
if
(
pConsumer
==
NULL
)
goto
CM_DECODE_OVER
;
if
(
pConsumer
==
NULL
)
goto
CM_DECODE_OVER
;
int32_t
dataPos
=
0
;
int32_t
dataPos
=
0
;
...
@@ -745,7 +747,8 @@ SSdbRow *mndConsumerActionDecode(SSdbRaw *pRaw) {
...
@@ -745,7 +747,8 @@ SSdbRow *mndConsumerActionDecode(SSdbRaw *pRaw) {
CM_DECODE_OVER:
CM_DECODE_OVER:
taosMemoryFreeClear
(
buf
);
taosMemoryFreeClear
(
buf
);
if
(
terrno
!=
TSDB_CODE_SUCCESS
)
{
if
(
terrno
!=
TSDB_CODE_SUCCESS
)
{
mError
(
"consumer:%"
PRId64
", failed to decode from raw:%p since %s"
,
pConsumer
->
consumerId
,
pRaw
,
terrstr
());
mError
(
"consumer:%"
PRId64
", failed to decode from raw:%p since %s"
,
pConsumer
==
NULL
?
0
:
pConsumer
->
consumerId
,
pRaw
,
terrstr
());
taosMemoryFreeClear
(
pRow
);
taosMemoryFreeClear
(
pRow
);
return
NULL
;
return
NULL
;
}
}
...
...
source/dnode/mnode/impl/src/mndDb.c
浏览文件 @
2d485639
...
@@ -147,6 +147,8 @@ _OVER:
...
@@ -147,6 +147,8 @@ _OVER:
static
SSdbRow
*
mndDbActionDecode
(
SSdbRaw
*
pRaw
)
{
static
SSdbRow
*
mndDbActionDecode
(
SSdbRaw
*
pRaw
)
{
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
SSdbRow
*
pRow
=
NULL
;
SDbObj
*
pDb
=
NULL
;
int8_t
sver
=
0
;
int8_t
sver
=
0
;
if
(
sdbGetRawSoftVer
(
pRaw
,
&
sver
)
!=
0
)
goto
_OVER
;
if
(
sdbGetRawSoftVer
(
pRaw
,
&
sver
)
!=
0
)
goto
_OVER
;
...
@@ -156,10 +158,10 @@ static SSdbRow *mndDbActionDecode(SSdbRaw *pRaw) {
...
@@ -156,10 +158,10 @@ static SSdbRow *mndDbActionDecode(SSdbRaw *pRaw) {
goto
_OVER
;
goto
_OVER
;
}
}
SSdbRow
*
pRow
=
sdbAllocRow
(
sizeof
(
SDbObj
));
pRow
=
sdbAllocRow
(
sizeof
(
SDbObj
));
if
(
pRow
==
NULL
)
goto
_OVER
;
if
(
pRow
==
NULL
)
goto
_OVER
;
SDbObj
*
pDb
=
sdbGetRowObj
(
pRow
);
pDb
=
sdbGetRowObj
(
pRow
);
if
(
pDb
==
NULL
)
goto
_OVER
;
if
(
pDb
==
NULL
)
goto
_OVER
;
int32_t
dataPos
=
0
;
int32_t
dataPos
=
0
;
...
@@ -232,7 +234,7 @@ static SSdbRow *mndDbActionDecode(SSdbRaw *pRaw) {
...
@@ -232,7 +234,7 @@ static SSdbRow *mndDbActionDecode(SSdbRaw *pRaw) {
_OVER:
_OVER:
if
(
terrno
!=
0
)
{
if
(
terrno
!=
0
)
{
mError
(
"db:%s, failed to decode from raw:%p since %s"
,
pDb
->
name
,
pRaw
,
terrstr
());
mError
(
"db:%s, failed to decode from raw:%p since %s"
,
pDb
==
NULL
?
"null"
:
pDb
->
name
,
pRaw
,
terrstr
());
taosMemoryFreeClear
(
pRow
);
taosMemoryFreeClear
(
pRow
);
return
NULL
;
return
NULL
;
}
}
...
...
source/dnode/mnode/impl/src/mndDnode.c
浏览文件 @
2d485639
...
@@ -154,8 +154,9 @@ _OVER:
...
@@ -154,8 +154,9 @@ _OVER:
}
}
static
SSdbRow
*
mndDnodeActionDecode
(
SSdbRaw
*
pRaw
)
{
static
SSdbRow
*
mndDnodeActionDecode
(
SSdbRaw
*
pRaw
)
{
SSdbRow
*
pRow
=
NULL
;
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
SSdbRow
*
pRow
=
NULL
;
SDnodeObj
*
pDnode
=
NULL
;
int8_t
sver
=
0
;
int8_t
sver
=
0
;
if
(
sdbGetRawSoftVer
(
pRaw
,
&
sver
)
!=
0
)
goto
_OVER
;
if
(
sdbGetRawSoftVer
(
pRaw
,
&
sver
)
!=
0
)
goto
_OVER
;
...
@@ -166,7 +167,8 @@ static SSdbRow *mndDnodeActionDecode(SSdbRaw *pRaw) {
...
@@ -166,7 +167,8 @@ static SSdbRow *mndDnodeActionDecode(SSdbRaw *pRaw) {
pRow
=
sdbAllocRow
(
sizeof
(
SDnodeObj
));
pRow
=
sdbAllocRow
(
sizeof
(
SDnodeObj
));
if
(
pRow
==
NULL
)
goto
_OVER
;
if
(
pRow
==
NULL
)
goto
_OVER
;
SDnodeObj
*
pDnode
=
sdbGetRowObj
(
pRow
);
pDnode
=
sdbGetRowObj
(
pRow
);
if
(
pDnode
==
NULL
)
goto
_OVER
;
if
(
pDnode
==
NULL
)
goto
_OVER
;
int32_t
dataPos
=
0
;
int32_t
dataPos
=
0
;
...
@@ -181,7 +183,7 @@ static SSdbRow *mndDnodeActionDecode(SSdbRaw *pRaw) {
...
@@ -181,7 +183,7 @@ static SSdbRow *mndDnodeActionDecode(SSdbRaw *pRaw) {
_OVER:
_OVER:
if
(
terrno
!=
0
)
{
if
(
terrno
!=
0
)
{
mError
(
"dnode:%d, failed to decode from raw:%p since %s"
,
pDnode
->
id
,
pRaw
,
terrstr
());
mError
(
"dnode:%d, failed to decode from raw:%p since %s"
,
pDnode
==
NULL
?
0
:
pDnode
->
id
,
pRaw
,
terrstr
());
taosMemoryFreeClear
(
pRow
);
taosMemoryFreeClear
(
pRow
);
return
NULL
;
return
NULL
;
}
}
...
...
source/dnode/mnode/impl/src/mndFunc.c
浏览文件 @
2d485639
...
@@ -101,6 +101,8 @@ _OVER:
...
@@ -101,6 +101,8 @@ _OVER:
static
SSdbRow
*
mndFuncActionDecode
(
SSdbRaw
*
pRaw
)
{
static
SSdbRow
*
mndFuncActionDecode
(
SSdbRaw
*
pRaw
)
{
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
SSdbRow
*
pRow
=
NULL
;
SFuncObj
*
pFunc
=
NULL
;
int8_t
sver
=
0
;
int8_t
sver
=
0
;
if
(
sdbGetRawSoftVer
(
pRaw
,
&
sver
)
!=
0
)
goto
_OVER
;
if
(
sdbGetRawSoftVer
(
pRaw
,
&
sver
)
!=
0
)
goto
_OVER
;
...
@@ -110,10 +112,10 @@ static SSdbRow *mndFuncActionDecode(SSdbRaw *pRaw) {
...
@@ -110,10 +112,10 @@ static SSdbRow *mndFuncActionDecode(SSdbRaw *pRaw) {
goto
_OVER
;
goto
_OVER
;
}
}
SSdbRow
*
pRow
=
sdbAllocRow
(
sizeof
(
SFuncObj
));
pRow
=
sdbAllocRow
(
sizeof
(
SFuncObj
));
if
(
pRow
==
NULL
)
goto
_OVER
;
if
(
pRow
==
NULL
)
goto
_OVER
;
SFuncObj
*
pFunc
=
sdbGetRowObj
(
pRow
);
pFunc
=
sdbGetRowObj
(
pRow
);
if
(
pFunc
==
NULL
)
goto
_OVER
;
if
(
pFunc
==
NULL
)
goto
_OVER
;
int32_t
dataPos
=
0
;
int32_t
dataPos
=
0
;
...
@@ -148,7 +150,7 @@ static SSdbRow *mndFuncActionDecode(SSdbRaw *pRaw) {
...
@@ -148,7 +150,7 @@ static SSdbRow *mndFuncActionDecode(SSdbRaw *pRaw) {
_OVER:
_OVER:
if
(
terrno
!=
0
)
{
if
(
terrno
!=
0
)
{
mError
(
"func:%s, failed to decode from raw:%p since %s"
,
pFunc
->
name
,
pRaw
,
terrstr
());
mError
(
"func:%s, failed to decode from raw:%p since %s"
,
pFunc
==
NULL
?
"null"
:
pFunc
->
name
,
pRaw
,
terrstr
());
taosMemoryFreeClear
(
pRow
);
taosMemoryFreeClear
(
pRow
);
return
NULL
;
return
NULL
;
}
}
...
...
source/dnode/mnode/impl/src/mndMnode.c
浏览文件 @
2d485639
...
@@ -142,6 +142,8 @@ _OVER:
...
@@ -142,6 +142,8 @@ _OVER:
static
SSdbRow
*
mndMnodeActionDecode
(
SSdbRaw
*
pRaw
)
{
static
SSdbRow
*
mndMnodeActionDecode
(
SSdbRaw
*
pRaw
)
{
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
SSdbRow
*
pRow
=
NULL
;
SMnodeObj
*
pObj
=
NULL
;
int8_t
sver
=
0
;
int8_t
sver
=
0
;
if
(
sdbGetRawSoftVer
(
pRaw
,
&
sver
)
!=
0
)
return
NULL
;
if
(
sdbGetRawSoftVer
(
pRaw
,
&
sver
)
!=
0
)
return
NULL
;
...
@@ -151,10 +153,10 @@ static SSdbRow *mndMnodeActionDecode(SSdbRaw *pRaw) {
...
@@ -151,10 +153,10 @@ static SSdbRow *mndMnodeActionDecode(SSdbRaw *pRaw) {
goto
_OVER
;
goto
_OVER
;
}
}
SSdbRow
*
pRow
=
sdbAllocRow
(
sizeof
(
SMnodeObj
));
pRow
=
sdbAllocRow
(
sizeof
(
SMnodeObj
));
if
(
pRow
==
NULL
)
goto
_OVER
;
if
(
pRow
==
NULL
)
goto
_OVER
;
SMnodeObj
*
pObj
=
sdbGetRowObj
(
pRow
);
pObj
=
sdbGetRowObj
(
pRow
);
if
(
pObj
==
NULL
)
goto
_OVER
;
if
(
pObj
==
NULL
)
goto
_OVER
;
int32_t
dataPos
=
0
;
int32_t
dataPos
=
0
;
...
@@ -167,7 +169,7 @@ static SSdbRow *mndMnodeActionDecode(SSdbRaw *pRaw) {
...
@@ -167,7 +169,7 @@ static SSdbRow *mndMnodeActionDecode(SSdbRaw *pRaw) {
_OVER:
_OVER:
if
(
terrno
!=
0
)
{
if
(
terrno
!=
0
)
{
mError
(
"mnode:%d, failed to decode from raw:%p since %s"
,
pObj
->
id
,
pRaw
,
terrstr
());
mError
(
"mnode:%d, failed to decode from raw:%p since %s"
,
pObj
==
NULL
?
0
:
pObj
->
id
,
pRaw
,
terrstr
());
taosMemoryFreeClear
(
pRow
);
taosMemoryFreeClear
(
pRow
);
return
NULL
;
return
NULL
;
}
}
...
...
source/dnode/mnode/impl/src/mndQnode.c
浏览文件 @
2d485639
...
@@ -100,6 +100,8 @@ _OVER:
...
@@ -100,6 +100,8 @@ _OVER:
static
SSdbRow
*
mndQnodeActionDecode
(
SSdbRaw
*
pRaw
)
{
static
SSdbRow
*
mndQnodeActionDecode
(
SSdbRaw
*
pRaw
)
{
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
SSdbRow
*
pRow
=
NULL
;
SQnodeObj
*
pObj
=
NULL
;
int8_t
sver
=
0
;
int8_t
sver
=
0
;
if
(
sdbGetRawSoftVer
(
pRaw
,
&
sver
)
!=
0
)
goto
_OVER
;
if
(
sdbGetRawSoftVer
(
pRaw
,
&
sver
)
!=
0
)
goto
_OVER
;
...
@@ -109,10 +111,10 @@ static SSdbRow *mndQnodeActionDecode(SSdbRaw *pRaw) {
...
@@ -109,10 +111,10 @@ static SSdbRow *mndQnodeActionDecode(SSdbRaw *pRaw) {
goto
_OVER
;
goto
_OVER
;
}
}
SSdbRow
*
pRow
=
sdbAllocRow
(
sizeof
(
SQnodeObj
));
pRow
=
sdbAllocRow
(
sizeof
(
SQnodeObj
));
if
(
pRow
==
NULL
)
goto
_OVER
;
if
(
pRow
==
NULL
)
goto
_OVER
;
SQnodeObj
*
pObj
=
sdbGetRowObj
(
pRow
);
pObj
=
sdbGetRowObj
(
pRow
);
if
(
pObj
==
NULL
)
goto
_OVER
;
if
(
pObj
==
NULL
)
goto
_OVER
;
int32_t
dataPos
=
0
;
int32_t
dataPos
=
0
;
...
@@ -125,7 +127,7 @@ static SSdbRow *mndQnodeActionDecode(SSdbRaw *pRaw) {
...
@@ -125,7 +127,7 @@ static SSdbRow *mndQnodeActionDecode(SSdbRaw *pRaw) {
_OVER:
_OVER:
if
(
terrno
!=
0
)
{
if
(
terrno
!=
0
)
{
mError
(
"qnode:%d, failed to decode from raw:%p since %s"
,
pObj
->
id
,
pRaw
,
terrstr
());
mError
(
"qnode:%d, failed to decode from raw:%p since %s"
,
pObj
==
NULL
?
0
:
pObj
->
id
,
pRaw
,
terrstr
());
taosMemoryFreeClear
(
pRow
);
taosMemoryFreeClear
(
pRow
);
return
NULL
;
return
NULL
;
}
}
...
...
source/dnode/mnode/impl/src/mndSma.c
浏览文件 @
2d485639
...
@@ -132,6 +132,8 @@ _OVER:
...
@@ -132,6 +132,8 @@ _OVER:
static
SSdbRow
*
mndSmaActionDecode
(
SSdbRaw
*
pRaw
)
{
static
SSdbRow
*
mndSmaActionDecode
(
SSdbRaw
*
pRaw
)
{
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
SSdbRow
*
pRow
=
NULL
;
SSmaObj
*
pSma
=
NULL
;
int8_t
sver
=
0
;
int8_t
sver
=
0
;
if
(
sdbGetRawSoftVer
(
pRaw
,
&
sver
)
!=
0
)
goto
_OVER
;
if
(
sdbGetRawSoftVer
(
pRaw
,
&
sver
)
!=
0
)
goto
_OVER
;
...
@@ -141,10 +143,10 @@ static SSdbRow *mndSmaActionDecode(SSdbRaw *pRaw) {
...
@@ -141,10 +143,10 @@ static SSdbRow *mndSmaActionDecode(SSdbRaw *pRaw) {
goto
_OVER
;
goto
_OVER
;
}
}
SSdbRow
*
pRow
=
sdbAllocRow
(
sizeof
(
SSmaObj
));
pRow
=
sdbAllocRow
(
sizeof
(
SSmaObj
));
if
(
pRow
==
NULL
)
goto
_OVER
;
if
(
pRow
==
NULL
)
goto
_OVER
;
SSmaObj
*
pSma
=
sdbGetRowObj
(
pRow
);
pSma
=
sdbGetRowObj
(
pRow
);
if
(
pSma
==
NULL
)
goto
_OVER
;
if
(
pSma
==
NULL
)
goto
_OVER
;
int32_t
dataPos
=
0
;
int32_t
dataPos
=
0
;
...
@@ -200,7 +202,7 @@ static SSdbRow *mndSmaActionDecode(SSdbRaw *pRaw) {
...
@@ -200,7 +202,7 @@ static SSdbRow *mndSmaActionDecode(SSdbRaw *pRaw) {
_OVER:
_OVER:
if
(
terrno
!=
0
)
{
if
(
terrno
!=
0
)
{
mError
(
"sma:%s, failed to decode from raw:%p since %s"
,
pSma
->
name
,
pRaw
,
terrstr
());
mError
(
"sma:%s, failed to decode from raw:%p since %s"
,
pSma
==
NULL
?
"null"
:
pSma
->
name
,
pRaw
,
terrstr
());
taosMemoryFreeClear
(
pSma
->
expr
);
taosMemoryFreeClear
(
pSma
->
expr
);
taosMemoryFreeClear
(
pSma
->
tagsFilter
);
taosMemoryFreeClear
(
pSma
->
tagsFilter
);
taosMemoryFreeClear
(
pSma
->
sql
);
taosMemoryFreeClear
(
pSma
->
sql
);
...
...
source/dnode/mnode/impl/src/mndSnode.c
浏览文件 @
2d485639
...
@@ -105,6 +105,8 @@ _OVER:
...
@@ -105,6 +105,8 @@ _OVER:
static
SSdbRow
*
mndSnodeActionDecode
(
SSdbRaw
*
pRaw
)
{
static
SSdbRow
*
mndSnodeActionDecode
(
SSdbRaw
*
pRaw
)
{
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
SSdbRow
*
pRow
=
NULL
;
SSnodeObj
*
pObj
=
NULL
;
int8_t
sver
=
0
;
int8_t
sver
=
0
;
if
(
sdbGetRawSoftVer
(
pRaw
,
&
sver
)
!=
0
)
goto
_OVER
;
if
(
sdbGetRawSoftVer
(
pRaw
,
&
sver
)
!=
0
)
goto
_OVER
;
...
@@ -114,10 +116,10 @@ static SSdbRow *mndSnodeActionDecode(SSdbRaw *pRaw) {
...
@@ -114,10 +116,10 @@ static SSdbRow *mndSnodeActionDecode(SSdbRaw *pRaw) {
goto
_OVER
;
goto
_OVER
;
}
}
SSdbRow
*
pRow
=
sdbAllocRow
(
sizeof
(
SSnodeObj
));
pRow
=
sdbAllocRow
(
sizeof
(
SSnodeObj
));
if
(
pRow
==
NULL
)
goto
_OVER
;
if
(
pRow
==
NULL
)
goto
_OVER
;
SSnodeObj
*
pObj
=
sdbGetRowObj
(
pRow
);
pObj
=
sdbGetRowObj
(
pRow
);
if
(
pObj
==
NULL
)
goto
_OVER
;
if
(
pObj
==
NULL
)
goto
_OVER
;
int32_t
dataPos
=
0
;
int32_t
dataPos
=
0
;
...
@@ -130,7 +132,7 @@ static SSdbRow *mndSnodeActionDecode(SSdbRaw *pRaw) {
...
@@ -130,7 +132,7 @@ static SSdbRow *mndSnodeActionDecode(SSdbRaw *pRaw) {
_OVER:
_OVER:
if
(
terrno
!=
0
)
{
if
(
terrno
!=
0
)
{
mError
(
"snode:%d, failed to decode from raw:%p since %s"
,
pObj
->
id
,
pRaw
,
terrstr
());
mError
(
"snode:%d, failed to decode from raw:%p since %s"
,
pObj
==
NULL
?
0
:
pObj
->
id
,
pRaw
,
terrstr
());
taosMemoryFreeClear
(
pRow
);
taosMemoryFreeClear
(
pRow
);
return
NULL
;
return
NULL
;
}
}
...
...
source/dnode/mnode/impl/src/mndStb.c
浏览文件 @
2d485639
...
@@ -162,6 +162,8 @@ _OVER:
...
@@ -162,6 +162,8 @@ _OVER:
static
SSdbRow
*
mndStbActionDecode
(
SSdbRaw
*
pRaw
)
{
static
SSdbRow
*
mndStbActionDecode
(
SSdbRaw
*
pRaw
)
{
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
SSdbRow
*
pRow
=
NULL
;
SStbObj
*
pStb
=
NULL
;
int8_t
sver
=
0
;
int8_t
sver
=
0
;
if
(
sdbGetRawSoftVer
(
pRaw
,
&
sver
)
!=
0
)
goto
_OVER
;
if
(
sdbGetRawSoftVer
(
pRaw
,
&
sver
)
!=
0
)
goto
_OVER
;
...
@@ -171,10 +173,10 @@ static SSdbRow *mndStbActionDecode(SSdbRaw *pRaw) {
...
@@ -171,10 +173,10 @@ static SSdbRow *mndStbActionDecode(SSdbRaw *pRaw) {
goto
_OVER
;
goto
_OVER
;
}
}
SSdbRow
*
pRow
=
sdbAllocRow
(
sizeof
(
SStbObj
));
pRow
=
sdbAllocRow
(
sizeof
(
SStbObj
));
if
(
pRow
==
NULL
)
goto
_OVER
;
if
(
pRow
==
NULL
)
goto
_OVER
;
SStbObj
*
pStb
=
sdbGetRowObj
(
pRow
);
pStb
=
sdbGetRowObj
(
pRow
);
if
(
pStb
==
NULL
)
goto
_OVER
;
if
(
pStb
==
NULL
)
goto
_OVER
;
int32_t
dataPos
=
0
;
int32_t
dataPos
=
0
;
...
@@ -254,10 +256,12 @@ static SSdbRow *mndStbActionDecode(SSdbRaw *pRaw) {
...
@@ -254,10 +256,12 @@ static SSdbRow *mndStbActionDecode(SSdbRaw *pRaw) {
_OVER:
_OVER:
if
(
terrno
!=
0
)
{
if
(
terrno
!=
0
)
{
mError
(
"stb:%s, failed to decode from raw:%p since %s"
,
pStb
->
name
,
pRaw
,
terrstr
());
mError
(
"stb:%s, failed to decode from raw:%p since %s"
,
pStb
==
NULL
?
"null"
:
pStb
->
name
,
pRaw
,
terrstr
());
taosMemoryFreeClear
(
pStb
->
pColumns
);
if
(
pStb
!=
NULL
)
{
taosMemoryFreeClear
(
pStb
->
pTags
);
taosMemoryFreeClear
(
pStb
->
pColumns
);
taosMemoryFreeClear
(
pStb
->
comment
);
taosMemoryFreeClear
(
pStb
->
pTags
);
taosMemoryFreeClear
(
pStb
->
comment
);
}
taosMemoryFreeClear
(
pRow
);
taosMemoryFreeClear
(
pRow
);
return
NULL
;
return
NULL
;
}
}
...
...
source/dnode/mnode/impl/src/mndStream.c
浏览文件 @
2d485639
...
@@ -120,7 +120,9 @@ STREAM_ENCODE_OVER:
...
@@ -120,7 +120,9 @@ STREAM_ENCODE_OVER:
SSdbRow
*
mndStreamActionDecode
(
SSdbRaw
*
pRaw
)
{
SSdbRow
*
mndStreamActionDecode
(
SSdbRaw
*
pRaw
)
{
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
void
*
buf
=
NULL
;
SSdbRow
*
pRow
=
NULL
;
SStreamObj
*
pStream
=
NULL
;
void
*
buf
=
NULL
;
int8_t
sver
=
0
;
int8_t
sver
=
0
;
if
(
sdbGetRawSoftVer
(
pRaw
,
&
sver
)
!=
0
)
goto
STREAM_DECODE_OVER
;
if
(
sdbGetRawSoftVer
(
pRaw
,
&
sver
)
!=
0
)
goto
STREAM_DECODE_OVER
;
...
@@ -130,11 +132,10 @@ SSdbRow *mndStreamActionDecode(SSdbRaw *pRaw) {
...
@@ -130,11 +132,10 @@ SSdbRow *mndStreamActionDecode(SSdbRaw *pRaw) {
goto
STREAM_DECODE_OVER
;
goto
STREAM_DECODE_OVER
;
}
}
int32_t
size
=
sizeof
(
SStreamObj
);
pRow
=
sdbAllocRow
(
sizeof
(
SStreamObj
));
SSdbRow
*
pRow
=
sdbAllocRow
(
size
);
if
(
pRow
==
NULL
)
goto
STREAM_DECODE_OVER
;
if
(
pRow
==
NULL
)
goto
STREAM_DECODE_OVER
;
SStreamObj
*
pStream
=
sdbGetRowObj
(
pRow
);
pStream
=
sdbGetRowObj
(
pRow
);
if
(
pStream
==
NULL
)
goto
STREAM_DECODE_OVER
;
if
(
pStream
==
NULL
)
goto
STREAM_DECODE_OVER
;
int32_t
tlen
;
int32_t
tlen
;
...
@@ -157,7 +158,7 @@ SSdbRow *mndStreamActionDecode(SSdbRaw *pRaw) {
...
@@ -157,7 +158,7 @@ SSdbRow *mndStreamActionDecode(SSdbRaw *pRaw) {
STREAM_DECODE_OVER:
STREAM_DECODE_OVER:
taosMemoryFreeClear
(
buf
);
taosMemoryFreeClear
(
buf
);
if
(
terrno
!=
TSDB_CODE_SUCCESS
)
{
if
(
terrno
!=
TSDB_CODE_SUCCESS
)
{
mError
(
"stream:%s, failed to decode from raw:%p since %s"
,
pStream
->
name
,
pRaw
,
terrstr
());
mError
(
"stream:%s, failed to decode from raw:%p since %s"
,
pStream
==
NULL
?
"null"
:
pStream
->
name
,
pRaw
,
terrstr
());
taosMemoryFreeClear
(
pRow
);
taosMemoryFreeClear
(
pRow
);
return
NULL
;
return
NULL
;
}
}
...
...
source/dnode/mnode/impl/src/mndSubscribe.c
浏览文件 @
2d485639
...
@@ -743,7 +743,9 @@ SUB_ENCODE_OVER:
...
@@ -743,7 +743,9 @@ SUB_ENCODE_OVER:
static
SSdbRow
*
mndSubActionDecode
(
SSdbRaw
*
pRaw
)
{
static
SSdbRow
*
mndSubActionDecode
(
SSdbRaw
*
pRaw
)
{
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
void
*
buf
=
NULL
;
SSdbRow
*
pRow
=
NULL
;
SMqSubscribeObj
*
pSub
=
NULL
;
void
*
buf
=
NULL
;
int8_t
sver
=
0
;
int8_t
sver
=
0
;
if
(
sdbGetRawSoftVer
(
pRaw
,
&
sver
)
!=
0
)
goto
SUB_DECODE_OVER
;
if
(
sdbGetRawSoftVer
(
pRaw
,
&
sver
)
!=
0
)
goto
SUB_DECODE_OVER
;
...
@@ -753,11 +755,10 @@ static SSdbRow *mndSubActionDecode(SSdbRaw *pRaw) {
...
@@ -753,11 +755,10 @@ static SSdbRow *mndSubActionDecode(SSdbRaw *pRaw) {
goto
SUB_DECODE_OVER
;
goto
SUB_DECODE_OVER
;
}
}
int32_t
size
=
sizeof
(
SMqSubscribeObj
);
pRow
=
sdbAllocRow
(
sizeof
(
SMqSubscribeObj
));
SSdbRow
*
pRow
=
sdbAllocRow
(
size
);
if
(
pRow
==
NULL
)
goto
SUB_DECODE_OVER
;
if
(
pRow
==
NULL
)
goto
SUB_DECODE_OVER
;
SMqSubscribeObj
*
pSub
=
sdbGetRowObj
(
pRow
);
pSub
=
sdbGetRowObj
(
pRow
);
if
(
pSub
==
NULL
)
goto
SUB_DECODE_OVER
;
if
(
pSub
==
NULL
)
goto
SUB_DECODE_OVER
;
int32_t
dataPos
=
0
;
int32_t
dataPos
=
0
;
...
@@ -777,7 +778,7 @@ static SSdbRow *mndSubActionDecode(SSdbRaw *pRaw) {
...
@@ -777,7 +778,7 @@ static SSdbRow *mndSubActionDecode(SSdbRaw *pRaw) {
SUB_DECODE_OVER:
SUB_DECODE_OVER:
taosMemoryFreeClear
(
buf
);
taosMemoryFreeClear
(
buf
);
if
(
terrno
!=
TSDB_CODE_SUCCESS
)
{
if
(
terrno
!=
TSDB_CODE_SUCCESS
)
{
mError
(
"subscribe:%s, failed to decode from raw:%p since %s"
,
pSub
->
key
,
pRaw
,
terrstr
());
mError
(
"subscribe:%s, failed to decode from raw:%p since %s"
,
pSub
==
NULL
?
"null"
:
pSub
->
key
,
pRaw
,
terrstr
());
taosMemoryFreeClear
(
pRow
);
taosMemoryFreeClear
(
pRow
);
return
NULL
;
return
NULL
;
}
}
...
...
source/dnode/mnode/impl/src/mndTopic.c
浏览文件 @
2d485639
...
@@ -152,8 +152,10 @@ TOPIC_ENCODE_OVER:
...
@@ -152,8 +152,10 @@ TOPIC_ENCODE_OVER:
SSdbRow
*
mndTopicActionDecode
(
SSdbRaw
*
pRaw
)
{
SSdbRow
*
mndTopicActionDecode
(
SSdbRaw
*
pRaw
)
{
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
SSdbRow
*
pRow
=
NULL
;
SMqTopicObj
*
pTopic
=
NULL
;
void
*
buf
=
NULL
;
void
*
buf
=
NULL
;
int8_t
sver
=
0
;
int8_t
sver
=
0
;
if
(
sdbGetRawSoftVer
(
pRaw
,
&
sver
)
!=
0
)
goto
TOPIC_DECODE_OVER
;
if
(
sdbGetRawSoftVer
(
pRaw
,
&
sver
)
!=
0
)
goto
TOPIC_DECODE_OVER
;
...
@@ -162,11 +164,10 @@ SSdbRow *mndTopicActionDecode(SSdbRaw *pRaw) {
...
@@ -162,11 +164,10 @@ SSdbRow *mndTopicActionDecode(SSdbRaw *pRaw) {
goto
TOPIC_DECODE_OVER
;
goto
TOPIC_DECODE_OVER
;
}
}
int32_t
size
=
sizeof
(
SMqTopicObj
);
pRow
=
sdbAllocRow
(
sizeof
(
SMqTopicObj
));
SSdbRow
*
pRow
=
sdbAllocRow
(
size
);
if
(
pRow
==
NULL
)
goto
TOPIC_DECODE_OVER
;
if
(
pRow
==
NULL
)
goto
TOPIC_DECODE_OVER
;
SMqTopicObj
*
pTopic
=
sdbGetRowObj
(
pRow
);
pTopic
=
sdbGetRowObj
(
pRow
);
if
(
pTopic
==
NULL
)
goto
TOPIC_DECODE_OVER
;
if
(
pTopic
==
NULL
)
goto
TOPIC_DECODE_OVER
;
int32_t
len
;
int32_t
len
;
...
@@ -251,7 +252,7 @@ SSdbRow *mndTopicActionDecode(SSdbRaw *pRaw) {
...
@@ -251,7 +252,7 @@ SSdbRow *mndTopicActionDecode(SSdbRaw *pRaw) {
TOPIC_DECODE_OVER:
TOPIC_DECODE_OVER:
taosMemoryFreeClear
(
buf
);
taosMemoryFreeClear
(
buf
);
if
(
terrno
!=
TSDB_CODE_SUCCESS
)
{
if
(
terrno
!=
TSDB_CODE_SUCCESS
)
{
mError
(
"topic:%s, failed to decode from raw:%p since %s"
,
pTopic
->
name
,
pRaw
,
terrstr
());
mError
(
"topic:%s, failed to decode from raw:%p since %s"
,
pTopic
==
NULL
?
"null"
:
pTopic
->
name
,
pRaw
,
terrstr
());
taosMemoryFreeClear
(
pRow
);
taosMemoryFreeClear
(
pRow
);
return
NULL
;
return
NULL
;
}
}
...
...
source/dnode/mnode/impl/src/mndUser.c
浏览文件 @
2d485639
...
@@ -182,6 +182,8 @@ _OVER:
...
@@ -182,6 +182,8 @@ _OVER:
static
SSdbRow
*
mndUserActionDecode
(
SSdbRaw
*
pRaw
)
{
static
SSdbRow
*
mndUserActionDecode
(
SSdbRaw
*
pRaw
)
{
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
SSdbRow
*
pRow
=
NULL
;
SUserObj
*
pUser
=
NULL
;
int8_t
sver
=
0
;
int8_t
sver
=
0
;
if
(
sdbGetRawSoftVer
(
pRaw
,
&
sver
)
!=
0
)
goto
_OVER
;
if
(
sdbGetRawSoftVer
(
pRaw
,
&
sver
)
!=
0
)
goto
_OVER
;
...
@@ -191,10 +193,10 @@ static SSdbRow *mndUserActionDecode(SSdbRaw *pRaw) {
...
@@ -191,10 +193,10 @@ static SSdbRow *mndUserActionDecode(SSdbRaw *pRaw) {
goto
_OVER
;
goto
_OVER
;
}
}
SSdbRow
*
pRow
=
sdbAllocRow
(
sizeof
(
SUserObj
));
pRow
=
sdbAllocRow
(
sizeof
(
SUserObj
));
if
(
pRow
==
NULL
)
goto
_OVER
;
if
(
pRow
==
NULL
)
goto
_OVER
;
SUserObj
*
pUser
=
sdbGetRowObj
(
pRow
);
pUser
=
sdbGetRowObj
(
pRow
);
if
(
pUser
==
NULL
)
goto
_OVER
;
if
(
pUser
==
NULL
)
goto
_OVER
;
int32_t
dataPos
=
0
;
int32_t
dataPos
=
0
;
...
@@ -254,10 +256,12 @@ static SSdbRow *mndUserActionDecode(SSdbRaw *pRaw) {
...
@@ -254,10 +256,12 @@ static SSdbRow *mndUserActionDecode(SSdbRaw *pRaw) {
_OVER:
_OVER:
if
(
terrno
!=
0
)
{
if
(
terrno
!=
0
)
{
mError
(
"user:%s, failed to decode from raw:%p since %s"
,
pUser
->
user
,
pRaw
,
terrstr
());
mError
(
"user:%s, failed to decode from raw:%p since %s"
,
pUser
==
NULL
?
"null"
:
pUser
->
user
,
pRaw
,
terrstr
());
taosHashCleanup
(
pUser
->
readDbs
);
if
(
pUser
!=
NULL
)
{
taosHashCleanup
(
pUser
->
writeDbs
);
taosHashCleanup
(
pUser
->
readDbs
);
taosHashCleanup
(
pUser
->
topics
);
taosHashCleanup
(
pUser
->
writeDbs
);
taosHashCleanup
(
pUser
->
topics
);
}
taosMemoryFreeClear
(
pRow
);
taosMemoryFreeClear
(
pRow
);
return
NULL
;
return
NULL
;
}
}
...
...
source/dnode/mnode/impl/src/mndVgroup.c
浏览文件 @
2d485639
...
@@ -113,6 +113,8 @@ _OVER:
...
@@ -113,6 +113,8 @@ _OVER:
SSdbRow
*
mndVgroupActionDecode
(
SSdbRaw
*
pRaw
)
{
SSdbRow
*
mndVgroupActionDecode
(
SSdbRaw
*
pRaw
)
{
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
SSdbRow
*
pRow
=
NULL
;
SVgObj
*
pVgroup
=
NULL
;
int8_t
sver
=
0
;
int8_t
sver
=
0
;
if
(
sdbGetRawSoftVer
(
pRaw
,
&
sver
)
!=
0
)
goto
_OVER
;
if
(
sdbGetRawSoftVer
(
pRaw
,
&
sver
)
!=
0
)
goto
_OVER
;
...
@@ -122,10 +124,10 @@ SSdbRow *mndVgroupActionDecode(SSdbRaw *pRaw) {
...
@@ -122,10 +124,10 @@ SSdbRow *mndVgroupActionDecode(SSdbRaw *pRaw) {
goto
_OVER
;
goto
_OVER
;
}
}
SSdbRow
*
pRow
=
sdbAllocRow
(
sizeof
(
SVgObj
));
pRow
=
sdbAllocRow
(
sizeof
(
SVgObj
));
if
(
pRow
==
NULL
)
goto
_OVER
;
if
(
pRow
==
NULL
)
goto
_OVER
;
SVgObj
*
pVgroup
=
sdbGetRowObj
(
pRow
);
pVgroup
=
sdbGetRowObj
(
pRow
);
if
(
pVgroup
==
NULL
)
goto
_OVER
;
if
(
pVgroup
==
NULL
)
goto
_OVER
;
int32_t
dataPos
=
0
;
int32_t
dataPos
=
0
;
...
@@ -152,7 +154,7 @@ SSdbRow *mndVgroupActionDecode(SSdbRaw *pRaw) {
...
@@ -152,7 +154,7 @@ SSdbRow *mndVgroupActionDecode(SSdbRaw *pRaw) {
_OVER:
_OVER:
if
(
terrno
!=
0
)
{
if
(
terrno
!=
0
)
{
mError
(
"vgId:%d, failed to decode from raw:%p since %s"
,
pVgroup
->
vgId
,
pRaw
,
terrstr
());
mError
(
"vgId:%d, failed to decode from raw:%p since %s"
,
pVgroup
==
NULL
?
0
:
pVgroup
->
vgId
,
pRaw
,
terrstr
());
taosMemoryFreeClear
(
pRow
);
taosMemoryFreeClear
(
pRow
);
return
NULL
;
return
NULL
;
}
}
...
...
tests/script/tsim/user/privilege_db.sim
浏览文件 @
2d485639
...
@@ -5,6 +5,10 @@ sql connect
...
@@ -5,6 +5,10 @@ sql connect
print =============== create db
print =============== create db
sql create database d1 vgroups 1;
sql create database d1 vgroups 1;
sql use d1
sql create table stb (ts timestamp, i int) tags (j int)
sql create topic topic_1 as select ts, i from stb
sql create database d2 vgroups 1;
sql create database d2 vgroups 1;
sql create database d3 vgroups 1;
sql create database d3 vgroups 1;
sql select * from information_schema.ins_databases
sql select * from information_schema.ins_databases
...
@@ -89,5 +93,6 @@ sql_error drop database d2;
...
@@ -89,5 +93,6 @@ sql_error drop database d2;
sql_error create stable d1.st (ts timestamp, i int) tags (j int)
sql_error create stable d1.st (ts timestamp, i int) tags (j int)
sql create stable d2.st (ts timestamp, i int) tags (j int)
sql create stable d2.st (ts timestamp, i int) tags (j int)
sql_error create topic topic_2 as select ts, i from stb
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s stop -x SIGINT
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录