Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
2c265b86
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1181
Star
22014
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
2c265b86
编写于
11月 14, 2022
作者:
D
dapan1121
提交者:
GitHub
11月 14, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #18113 from taosdata/fix/asanIssues
fix: fix asan issues
上级
70b937cf
d2468c55
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
37 addition
and
20 deletion
+37
-20
include/common/ttypes.h
include/common/ttypes.h
+2
-2
source/common/src/ttypes.c
source/common/src/ttypes.c
+18
-8
source/dnode/vnode/src/vnd/vnodeQuery.c
source/dnode/vnode/src/vnd/vnodeQuery.c
+4
-2
source/libs/scalar/src/filter.c
source/libs/scalar/src/filter.c
+8
-5
source/libs/scheduler/src/schRemote.c
source/libs/scheduler/src/schRemote.c
+5
-3
未找到文件。
include/common/ttypes.h
浏览文件 @
2c265b86
...
...
@@ -346,8 +346,8 @@ bool isValidDataType(int32_t type);
void
assignVal
(
char
*
val
,
const
char
*
src
,
int32_t
len
,
int32_t
type
);
void
operateVal
(
void
*
dst
,
void
*
s1
,
void
*
s2
,
int32_t
optr
,
int32_t
type
);
void
*
getDataMin
(
int32_t
type
);
void
*
getDataMax
(
int32_t
type
);
void
*
getDataMin
(
int32_t
type
,
void
*
value
);
void
*
getDataMax
(
int32_t
type
,
void
*
value
);
#ifdef __cplusplus
}
...
...
source/common/src/ttypes.c
浏览文件 @
2c265b86
...
...
@@ -61,26 +61,36 @@ tDataTypeDescriptor tDataTypes[TSDB_DATA_TYPE_MAX] = {
static
float
floatMin
=
-
FLT_MAX
,
floatMax
=
FLT_MAX
;
static
double
doubleMin
=
-
DBL_MAX
,
doubleMax
=
DBL_MAX
;
FORCE_INLINE
void
*
getDataMin
(
int32_t
type
)
{
FORCE_INLINE
void
*
getDataMin
(
int32_t
type
,
void
*
value
)
{
switch
(
type
)
{
case
TSDB_DATA_TYPE_FLOAT
:
return
&
floatMin
;
*
(
float
*
)
value
=
floatMin
;
break
;
case
TSDB_DATA_TYPE_DOUBLE
:
return
&
doubleMin
;
*
(
double
*
)
value
=
doubleMin
;
break
;
default:
return
&
tDataTypes
[
type
].
minValue
;
*
(
int64_t
*
)
value
=
tDataTypes
[
type
].
minValue
;
break
;
}
return
value
;
}
FORCE_INLINE
void
*
getDataMax
(
int32_t
type
)
{
FORCE_INLINE
void
*
getDataMax
(
int32_t
type
,
void
*
value
)
{
switch
(
type
)
{
case
TSDB_DATA_TYPE_FLOAT
:
return
&
floatMax
;
*
(
float
*
)
value
=
floatMax
;
break
;
case
TSDB_DATA_TYPE_DOUBLE
:
return
&
doubleMax
;
*
(
double
*
)
value
=
doubleMax
;
break
;
default:
return
&
tDataTypes
[
type
].
maxValue
;
*
(
int64_t
*
)
value
=
tDataTypes
[
type
].
maxValue
;
break
;
}
return
value
;
}
bool
isValidDataType
(
int32_t
type
)
{
return
type
>=
TSDB_DATA_TYPE_NULL
&&
type
<
TSDB_DATA_TYPE_MAX
;
}
...
...
source/dnode/vnode/src/vnd/vnodeQuery.c
浏览文件 @
2c265b86
...
...
@@ -388,8 +388,10 @@ int32_t vnodeGetBatchMeta(SVnode *pVnode, SRpcMsg *pMsg) {
offset
+=
sizeof
(
p
->
msgLen
);
*
(
int32_t
*
)((
char
*
)
pRsp
+
offset
)
=
htonl
(
p
->
rspCode
);
offset
+=
sizeof
(
p
->
rspCode
);
memcpy
((
char
*
)
pRsp
+
offset
,
p
->
msg
,
p
->
msgLen
);
offset
+=
p
->
msgLen
;
if
(
p
->
msg
)
{
memcpy
((
char
*
)
pRsp
+
offset
,
p
->
msg
,
p
->
msgLen
);
offset
+=
p
->
msgLen
;
}
taosMemoryFreeClear
(
p
->
msg
);
}
...
...
source/libs/scalar/src/filter.c
浏览文件 @
2c265b86
...
...
@@ -512,15 +512,17 @@ int32_t filterReuseRangeCtx(SFilterRangeCtx *ctx, int32_t type, int32_t options)
}
int32_t
filterConvertRange
(
SFilterRangeCtx
*
cur
,
SFilterRange
*
ra
,
bool
*
notNull
)
{
int64_t
tmp
=
0
;
if
(
!
FILTER_GET_FLAG
(
ra
->
sflag
,
RANGE_FLG_NULL
))
{
int32_t
sr
=
cur
->
pCompareFunc
(
&
ra
->
s
,
getDataMin
(
cur
->
type
));
int32_t
sr
=
cur
->
pCompareFunc
(
&
ra
->
s
,
getDataMin
(
cur
->
type
,
&
tmp
));
if
(
sr
==
0
)
{
FILTER_SET_FLAG
(
ra
->
sflag
,
RANGE_FLG_NULL
);
}
}
if
(
!
FILTER_GET_FLAG
(
ra
->
eflag
,
RANGE_FLG_NULL
))
{
int32_t
er
=
cur
->
pCompareFunc
(
&
ra
->
e
,
getDataMax
(
cur
->
type
));
int32_t
er
=
cur
->
pCompareFunc
(
&
ra
->
e
,
getDataMax
(
cur
->
type
,
&
tmp
));
if
(
er
==
0
)
{
FILTER_SET_FLAG
(
ra
->
eflag
,
RANGE_FLG_NULL
);
}
...
...
@@ -696,14 +698,15 @@ int32_t filterAddRangeImpl(void *h, SFilterRange *ra, int32_t optr) {
int32_t
filterAddRange
(
void
*
h
,
SFilterRange
*
ra
,
int32_t
optr
)
{
SFilterRangeCtx
*
ctx
=
(
SFilterRangeCtx
*
)
h
;
int64_t
tmp
=
0
;
if
(
FILTER_GET_FLAG
(
ra
->
sflag
,
RANGE_FLG_NULL
))
{
SIMPLE_COPY_VALUES
(
&
ra
->
s
,
getDataMin
(
ctx
->
type
));
SIMPLE_COPY_VALUES
(
&
ra
->
s
,
getDataMin
(
ctx
->
type
,
&
tmp
));
// FILTER_CLR_FLAG(ra->sflag, RA_NULL);
}
if
(
FILTER_GET_FLAG
(
ra
->
eflag
,
RANGE_FLG_NULL
))
{
SIMPLE_COPY_VALUES
(
&
ra
->
e
,
getDataMax
(
ctx
->
type
));
SIMPLE_COPY_VALUES
(
&
ra
->
e
,
getDataMax
(
ctx
->
type
,
&
tmp
));
// FILTER_CLR_FLAG(ra->eflag, RA_NULL);
}
...
...
source/libs/scheduler/src/schRemote.c
浏览文件 @
2c265b86
...
...
@@ -286,9 +286,11 @@ int32_t schHandleResponseMsg(SSchJob *pJob, SSchTask *pTask, int32_t execId, SDa
if
(
pJob
->
execRes
.
res
)
{
SSubmitRsp
*
sum
=
pJob
->
execRes
.
res
;
sum
->
affectedRows
+=
rsp
->
affectedRows
;
sum
->
nBlocks
+=
rsp
->
nBlocks
;
sum
->
pBlocks
=
taosMemoryRealloc
(
sum
->
pBlocks
,
sum
->
nBlocks
*
sizeof
(
*
sum
->
pBlocks
));
memcpy
(
sum
->
pBlocks
+
sum
->
nBlocks
-
rsp
->
nBlocks
,
rsp
->
pBlocks
,
rsp
->
nBlocks
*
sizeof
(
*
sum
->
pBlocks
));
sum
->
nBlocks
+=
rsp
->
nBlocks
;
if
(
rsp
->
nBlocks
>
0
&&
rsp
->
pBlocks
)
{
sum
->
pBlocks
=
taosMemoryRealloc
(
sum
->
pBlocks
,
sum
->
nBlocks
*
sizeof
(
*
sum
->
pBlocks
));
memcpy
(
sum
->
pBlocks
+
sum
->
nBlocks
-
rsp
->
nBlocks
,
rsp
->
pBlocks
,
rsp
->
nBlocks
*
sizeof
(
*
sum
->
pBlocks
));
}
taosMemoryFree
(
rsp
->
pBlocks
);
taosMemoryFree
(
rsp
);
}
else
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录