Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
4c8a2caa
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
4c8a2caa
编写于
1月 12, 2023
作者:
X
Xiaoyu Wang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: stmt memory leak
上级
4359562e
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
17 addition
and
6 deletion
+17
-6
include/libs/parser/parser.h
include/libs/parser/parser.h
+3
-1
source/client/src/clientStmt.c
source/client/src/clientStmt.c
+1
-5
source/libs/parser/src/parInsertStmt.c
source/libs/parser/src/parInsertStmt.c
+13
-0
未找到文件。
include/libs/parser/parser.h
浏览文件 @
4c8a2caa
...
@@ -90,6 +90,7 @@ int32_t qCloneStmtDataBlock(void** pDst, void* pSrc);
...
@@ -90,6 +90,7 @@ int32_t qCloneStmtDataBlock(void** pDst, void* pSrc);
void
qFreeStmtDataBlock
(
void
*
pDataBlock
);
void
qFreeStmtDataBlock
(
void
*
pDataBlock
);
int32_t
qRebuildStmtDataBlock
(
void
**
pDst
,
void
*
pSrc
,
uint64_t
uid
,
int32_t
vgId
);
int32_t
qRebuildStmtDataBlock
(
void
**
pDst
,
void
*
pSrc
,
uint64_t
uid
,
int32_t
vgId
);
void
qDestroyStmtDataBlock
(
void
*
pBlock
);
void
qDestroyStmtDataBlock
(
void
*
pBlock
);
void
qDestroyStmtDataBlockExt
(
void
*
pBlock
);
STableMeta
*
qGetTableMetaInDataBlock
(
void
*
pDataBlock
);
STableMeta
*
qGetTableMetaInDataBlock
(
void
*
pDataBlock
);
int32_t
qStmtBindParams
(
SQuery
*
pQuery
,
TAOS_MULTI_BIND
*
pParams
,
int32_t
colIdx
);
int32_t
qStmtBindParams
(
SQuery
*
pQuery
,
TAOS_MULTI_BIND
*
pParams
,
int32_t
colIdx
);
...
@@ -108,7 +109,8 @@ int32_t qCreateSName(SName* pName, const char* pTableName, int32_t acctId, char*
...
@@ -108,7 +109,8 @@ int32_t qCreateSName(SName* pName, const char* pTableName, int32_t acctId, char*
void
*
smlInitHandle
(
SQuery
*
pQuery
);
void
*
smlInitHandle
(
SQuery
*
pQuery
);
void
smlDestroyHandle
(
void
*
pHandle
);
void
smlDestroyHandle
(
void
*
pHandle
);
int32_t
smlBindData
(
void
*
handle
,
SArray
*
tags
,
SArray
*
colsSchema
,
SArray
*
cols
,
bool
format
,
STableMeta
*
pTableMeta
,
int32_t
smlBindData
(
void
*
handle
,
SArray
*
tags
,
SArray
*
colsSchema
,
SArray
*
cols
,
bool
format
,
STableMeta
*
pTableMeta
,
char
*
tableName
,
const
char
*
sTableName
,
int32_t
sTableNameLen
,
int32_t
ttl
,
char
*
msgBuf
,
int16_t
msgBufLen
);
char
*
tableName
,
const
char
*
sTableName
,
int32_t
sTableNameLen
,
int32_t
ttl
,
char
*
msgBuf
,
int16_t
msgBufLen
);
int32_t
smlBuildOutput
(
void
*
handle
,
SHashObj
*
pVgHash
);
int32_t
smlBuildOutput
(
void
*
handle
,
SHashObj
*
pVgHash
);
int32_t
rewriteToVnodeModifyOpStmt
(
SQuery
*
pQuery
,
SArray
*
pBufArray
);
int32_t
rewriteToVnodeModifyOpStmt
(
SQuery
*
pQuery
,
SArray
*
pBufArray
);
...
...
source/client/src/clientStmt.c
浏览文件 @
4c8a2caa
...
@@ -301,11 +301,7 @@ int32_t stmtCleanExecInfo(STscStmt* pStmt, bool keepTable, bool deepClean) {
...
@@ -301,11 +301,7 @@ int32_t stmtCleanExecInfo(STscStmt* pStmt, bool keepTable, bool deepClean) {
continue
;
continue
;
}
}
if
(
pBlocks
->
cloned
)
{
qDestroyStmtDataBlockExt
(
pBlocks
);
qFreeStmtDataBlock
(
pBlocks
);
}
else
{
qDestroyStmtDataBlock
(
pBlocks
);
}
taosHashRemove
(
pStmt
->
exec
.
pBlockHash
,
key
,
keyLen
);
taosHashRemove
(
pStmt
->
exec
.
pBlockHash
,
key
,
keyLen
);
pIter
=
taosHashIterate
(
pStmt
->
exec
.
pBlockHash
,
pIter
);
pIter
=
taosHashIterate
(
pStmt
->
exec
.
pBlockHash
,
pIter
);
...
...
source/libs/parser/src/parInsertStmt.c
浏览文件 @
4c8a2caa
...
@@ -476,3 +476,16 @@ void qDestroyStmtDataBlock(void* pBlock) {
...
@@ -476,3 +476,16 @@ void qDestroyStmtDataBlock(void* pBlock) {
pDataBlock
->
cloned
=
false
;
pDataBlock
->
cloned
=
false
;
insDestroyDataBlock
(
pDataBlock
);
insDestroyDataBlock
(
pDataBlock
);
}
}
void
qDestroyStmtDataBlockExt
(
void
*
pBlock
)
{
if
(
pBlock
==
NULL
)
{
return
;
}
STableDataBlocks
*
pDataBlock
=
(
STableDataBlocks
*
)
pBlock
;
if
(
pDataBlock
->
cloned
)
{
qFreeStmtDataBlock
(
pBlock
);
}
else
{
qDestroyStmtDataBlock
(
pBlock
);
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录