Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
0ec07172
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看板
提交
0ec07172
编写于
2月 08, 2023
作者:
X
Xiaoyu Wang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: invild free
上级
69022a1c
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
12 addition
and
10 deletion
+12
-10
source/libs/executor/src/dataDeleter.c
source/libs/executor/src/dataDeleter.c
+9
-7
source/libs/parser/src/parTranslater.c
source/libs/parser/src/parTranslater.c
+3
-3
未找到文件。
source/libs/executor/src/dataDeleter.c
浏览文件 @
0ec07172
...
...
@@ -62,8 +62,8 @@ static void toDataCacheEntry(SDataDeleterHandle* pHandle, const SInputData* pInp
pEntry
->
numOfCols
=
taosArrayGetSize
(
pInput
->
pData
->
pDataBlock
);
pEntry
->
dataLen
=
sizeof
(
SDeleterRes
);
// ASSERT(1 == pEntry->numOfRows);
// ASSERT(3 == pEntry->numOfCols);
// ASSERT(1 == pEntry->numOfRows);
// ASSERT(3 == pEntry->numOfCols);
pBuf
->
useSize
=
sizeof
(
SDataCacheEntry
);
...
...
@@ -142,7 +142,7 @@ static int32_t putDataBlock(SDataSinkHandle* pHandle, const SInputData* pInput,
taosFreeQitem
(
pBuf
);
return
TSDB_CODE_OUT_OF_MEMORY
;
}
toDataCacheEntry
(
pDeleter
,
pInput
,
pBuf
);
taosWriteQitem
(
pDeleter
->
pDataBlocks
,
pBuf
);
*
pContinue
=
(
DS_BUF_LOW
==
updateStatus
(
pDeleter
)
?
true
:
false
);
...
...
@@ -167,8 +167,10 @@ static void getDataLength(SDataSinkHandle* pHandle, int64_t* pLen, bool* pQueryE
SDataDeleterBuf
*
pBuf
=
NULL
;
taosReadQitem
(
pDeleter
->
pDataBlocks
,
(
void
**
)
&
pBuf
);
memcpy
(
&
pDeleter
->
nextOutput
,
pBuf
,
sizeof
(
SDataDeleterBuf
));
taosFreeQitem
(
pBuf
);
if
(
pBuf
!=
NULL
)
{
memcpy
(
&
pDeleter
->
nextOutput
,
pBuf
,
sizeof
(
SDataDeleterBuf
));
taosFreeQitem
(
pBuf
);
}
SDataCacheEntry
*
pEntry
=
(
SDataCacheEntry
*
)
pDeleter
->
nextOutput
.
pData
;
*
pLen
=
pEntry
->
dataLen
;
...
...
@@ -256,7 +258,7 @@ int32_t createDataDeleter(SDataSinkManager* pManager, const SDataSinkNode* pData
deleter
->
pDeleter
=
pDeleterNode
;
deleter
->
pSchema
=
pDataSink
->
pInputDataBlockDesc
;
if
(
pParam
==
NULL
)
{
if
(
pParam
==
NULL
)
{
code
=
TSDB_CODE_QRY_INVALID_INPUT
;
qError
(
"invalid input param in creating data deleter, code%s"
,
tstrerror
(
code
));
goto
_end
;
...
...
@@ -275,7 +277,7 @@ int32_t createDataDeleter(SDataSinkManager* pManager, const SDataSinkNode* pData
*
pHandle
=
deleter
;
return
code
;
_end:
_end:
if
(
deleter
!=
NULL
)
{
destroyDataSinker
((
SDataSinkHandle
*
)
deleter
);
taosMemoryFree
(
deleter
);
...
...
source/libs/parser/src/parTranslater.c
浏览文件 @
0ec07172
...
...
@@ -3517,7 +3517,7 @@ static int32_t translateSetOperProject(STranslateContext* pCxt, SSetOperator* pS
if
(
comp
>
0
)
{
SNode
*
pRightFunc
=
NULL
;
int32_t
code
=
createCastFunc
(
pCxt
,
pRight
,
pLeftExpr
->
resType
,
&
pRightFunc
);
if
(
TSDB_CODE_SUCCESS
!=
code
||
NULL
==
pRightFunc
)
{
// deal scan coverity
if
(
TSDB_CODE_SUCCESS
!=
code
||
NULL
==
pRightFunc
)
{
// deal scan coverity
return
code
;
}
REPLACE_LIST2_NODE
(
pRightFunc
);
...
...
@@ -3525,7 +3525,7 @@ static int32_t translateSetOperProject(STranslateContext* pCxt, SSetOperator* pS
}
else
if
(
comp
<
0
)
{
SNode
*
pLeftFunc
=
NULL
;
int32_t
code
=
createCastFunc
(
pCxt
,
pLeft
,
pRightExpr
->
resType
,
&
pLeftFunc
);
if
(
TSDB_CODE_SUCCESS
!=
code
||
NULL
==
pLeftFunc
)
{
// deal scan coverity
if
(
TSDB_CODE_SUCCESS
!=
code
||
NULL
==
pLeftFunc
)
{
// deal scan coverity
return
code
;
}
REPLACE_LIST1_NODE
(
pLeftFunc
);
...
...
@@ -5809,7 +5809,7 @@ static int32_t projColPosCompar(const void* l, const void* r) {
return
((
SProjColPos
*
)
l
)
->
colId
>
((
SProjColPos
*
)
r
)
->
colId
;
}
static
void
projColPosDelete
(
void
*
p
)
{
taosMemoryFre
e
(((
SProjColPos
*
)
p
)
->
pProj
);
}
static
void
projColPosDelete
(
void
*
p
)
{
nodesDestroyNod
e
(((
SProjColPos
*
)
p
)
->
pProj
);
}
static
int32_t
addProjToProjColPos
(
STranslateContext
*
pCxt
,
const
SSchema
*
pSchema
,
SNode
*
pProj
,
SArray
*
pProjColPos
)
{
SNode
*
pNewProj
=
nodesCloneNode
(
pProj
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录