Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
242a53c2
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看板
提交
242a53c2
编写于
10月 13, 2022
作者:
X
Xiaoyu Wang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
enh: do coverity scan
上级
7a19119d
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
13 addition
and
13 deletion
+13
-13
source/libs/nodes/src/nodesMsgFuncs.c
source/libs/nodes/src/nodesMsgFuncs.c
+1
-1
source/libs/parser/src/parTranslater.c
source/libs/parser/src/parTranslater.c
+12
-12
未找到文件。
source/libs/nodes/src/nodesMsgFuncs.c
浏览文件 @
242a53c2
...
...
@@ -923,7 +923,7 @@ static int32_t msgToDatum(STlv* pTlv, void* pObj) {
break
;
}
case
TSDB_DATA_TYPE_JSON
:
{
if
(
pTlv
->
len
<=
0
||
pTlv
>
TSDB_MAX_JSON_TAG_LEN
)
{
if
(
pTlv
->
len
<=
0
||
pTlv
->
len
>
TSDB_MAX_JSON_TAG_LEN
)
{
code
=
TSDB_CODE_FAILED
;
break
;
}
...
...
source/libs/parser/src/parTranslater.c
浏览文件 @
242a53c2
...
...
@@ -308,7 +308,7 @@ static int32_t addNamespace(STranslateContext* pCxt, void* pTable) {
static
int32_t
collectUseDatabaseImpl
(
const
char
*
pFullDbName
,
SHashObj
*
pDbs
)
{
SFullDatabaseName
name
=
{
0
};
s
trncpy
(
name
.
fullDbName
,
pFullDbName
,
sizeof
(
name
.
fullDbName
)
-
1
);
s
nprintf
(
name
.
fullDbName
,
sizeof
(
name
.
fullDbName
),
"%s"
,
pFullDbName
);
return
taosHashPut
(
pDbs
,
pFullDbName
,
strlen
(
pFullDbName
),
&
name
,
sizeof
(
SFullDatabaseName
));
}
...
...
@@ -3429,10 +3429,10 @@ static SNode* createSetOperProject(const char* pTableAlias, SNode* pNode) {
return
NULL
;
}
pCol
->
node
.
resType
=
((
SExprNode
*
)
pNode
)
->
resType
;
s
trcpy
(
pCol
->
tableAlias
,
pTableAlias
);
s
trcpy
(
pCol
->
colName
,
((
SExprNode
*
)
pNode
)
->
aliasName
);
s
trcpy
(
pCol
->
node
.
aliasName
,
pCol
->
colName
);
s
trcpy
(
pCol
->
node
.
userAlias
,
((
SExprNode
*
)
pNode
)
->
userAlias
);
s
nprintf
(
pCol
->
tableAlias
,
sizeof
(
pCol
->
tableAlias
),
"%s"
,
pTableAlias
);
s
nprintf
(
pCol
->
colName
,
sizeof
(
pCol
->
colName
),
"%s"
,
((
SExprNode
*
)
pNode
)
->
aliasName
);
s
nprintf
(
pCol
->
node
.
aliasName
,
sizeof
(
pCol
->
node
.
aliasName
),
"%s"
,
pCol
->
colName
);
s
nprintf
(
pCol
->
node
.
userAlias
,
sizeof
(
pCol
->
node
.
userAlias
),
"%s"
,
((
SExprNode
*
)
pNode
)
->
userAlias
);
return
(
SNode
*
)
pCol
;
}
...
...
@@ -3739,8 +3739,8 @@ static int32_t buildCreateDbReq(STranslateContext* pCxt, SCreateDatabaseStmt* pS
static
int32_t
checkRangeOption
(
STranslateContext
*
pCxt
,
int32_t
code
,
const
char
*
pName
,
int32_t
val
,
int32_t
minVal
,
int32_t
maxVal
)
{
if
(
val
>=
0
&&
(
val
<
minVal
||
val
>
maxVal
))
{
return
generateSyntaxErrMsgExt
(
&
pCxt
->
msgBuf
,
code
,
"Invalid option %s: %
"
PRId64
" valid range: [%d, %d]"
,
pName
,
val
,
minVal
,
maxVal
);
return
generateSyntaxErrMsgExt
(
&
pCxt
->
msgBuf
,
code
,
"Invalid option %s: %
d valid range: [%d, %d]"
,
pName
,
val
,
minVal
,
maxVal
);
}
return
TSDB_CODE_SUCCESS
;
}
...
...
@@ -4939,9 +4939,9 @@ static int32_t translateAlterUser(STranslateContext* pCxt, SAlterUserStmt* pStmt
alterReq
.
superUser
=
0
;
alterReq
.
enable
=
pStmt
->
enable
;
alterReq
.
sysInfo
=
pStmt
->
sysinfo
;
s
trcpy
(
alterReq
.
pass
,
pStmt
->
password
);
s
nprintf
(
alterReq
.
pass
,
sizeof
(
alterReq
.
pass
),
"%s"
,
pStmt
->
password
);
if
(
NULL
!=
pCxt
->
pParseCxt
->
db
)
{
s
trcpy
(
alterReq
.
dbname
,
pCxt
->
pParseCxt
->
db
);
s
nprintf
(
alterReq
.
dbname
,
sizeof
(
alterReq
.
dbname
),
"%s"
,
pCxt
->
pParseCxt
->
db
);
}
return
buildCmdMsg
(
pCxt
,
TDMT_MND_ALTER_USER
,
(
FSerializeFunc
)
tSerializeSAlterUserReq
,
&
alterReq
);
...
...
@@ -6081,9 +6081,9 @@ static int32_t createSimpleSelectStmt(const char* pDb, const char* pTable, int32
nodesDestroyNode
((
SNode
*
)
pSelect
);
return
TSDB_CODE_OUT_OF_MEMORY
;
}
s
trcpy
(
pRealTable
->
table
.
dbName
,
pDb
);
s
trcpy
(
pRealTable
->
table
.
tableName
,
pTable
);
s
trcpy
(
pRealTable
->
table
.
tableAlias
,
pTable
);
s
nprintf
(
pRealTable
->
table
.
dbName
,
sizeof
(
pRealTable
->
table
.
dbName
),
"%s"
,
pDb
);
s
nprintf
(
pRealTable
->
table
.
tableName
,
sizeof
(
pRealTable
->
table
.
tableName
),
"%s"
,
pTable
);
s
nprintf
(
pRealTable
->
table
.
tableAlias
,
sizeof
(
pRealTable
->
table
.
tableAlias
),
"%s"
,
pTable
);
pSelect
->
pFromTable
=
(
SNode
*
)
pRealTable
;
if
(
numOfProjs
>=
0
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录