Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
92609ada
T
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1192
Star
22018
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看板
提交
92609ada
编写于
8月 01, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
差异文件
Merge branch '3.0' into fix/valgrind
上级
7eadfb21
27437d85
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
40 addition
and
55 deletion
+40
-55
source/client/src/clientEnv.c
source/client/src/clientEnv.c
+1
-0
source/libs/catalog/src/ctgUtil.c
source/libs/catalog/src/ctgUtil.c
+9
-1
source/libs/nodes/src/nodesUtilFuncs.c
source/libs/nodes/src/nodesUtilFuncs.c
+1
-0
source/libs/parser/src/parTranslater.c
source/libs/parser/src/parTranslater.c
+1
-0
source/libs/scheduler/src/schRemote.c
source/libs/scheduler/src/schRemote.c
+15
-8
source/libs/scheduler/src/schTask.c
source/libs/scheduler/src/schTask.c
+6
-1
tests/script/tsim/valgrind/basic2.sim
tests/script/tsim/valgrind/basic2.sim
+7
-45
未找到文件。
source/client/src/clientEnv.c
浏览文件 @
92609ada
...
...
@@ -316,6 +316,7 @@ void doDestroyRequest(void *p) {
taosArrayDestroy
(
pRequest
->
tableList
);
taosArrayDestroy
(
pRequest
->
dbList
);
taosArrayDestroy
(
pRequest
->
targetTableList
);
destroyQueryExecRes
(
&
pRequest
->
body
.
resInfo
.
execRes
);
...
...
source/libs/catalog/src/ctgUtil.c
浏览文件 @
92609ada
...
...
@@ -30,12 +30,20 @@ void ctgFreeMsgSendParam(void* param) {
taosMemoryFree
(
param
);
}
void
ctgFreeBatchMsg
(
void
*
msg
)
{
if
(
NULL
==
msg
)
{
return
;
}
SBatchMsg
*
pMsg
=
(
SBatchMsg
*
)
msg
;
taosMemoryFree
(
pMsg
->
msg
);
}
void
ctgFreeBatch
(
SCtgBatch
*
pBatch
)
{
if
(
NULL
==
pBatch
)
{
return
;
}
taosArrayDestroy
(
pBatch
->
pMsgs
);
taosArrayDestroy
Ex
(
pBatch
->
pMsgs
,
ctgFreeBatchMsg
);
taosArrayDestroy
(
pBatch
->
pTaskIds
);
}
...
...
source/libs/nodes/src/nodesUtilFuncs.c
浏览文件 @
92609ada
...
...
@@ -745,6 +745,7 @@ void nodesDestroyNode(SNode* pNode) {
}
taosArrayDestroy
(
pQuery
->
pDbList
);
taosArrayDestroy
(
pQuery
->
pTableList
);
taosArrayDestroy
(
pQuery
->
pTargetTableList
);
taosArrayDestroy
(
pQuery
->
pPlaceholderValues
);
nodesDestroyNode
(
pQuery
->
pPrepareRoot
);
break
;
...
...
source/libs/parser/src/parTranslater.c
浏览文件 @
92609ada
...
...
@@ -398,6 +398,7 @@ static void destroyTranslateContext(STranslateContext* pCxt) {
taosHashCleanup
(
pCxt
->
pDbs
);
taosHashCleanup
(
pCxt
->
pTables
);
taosHashCleanup
(
pCxt
->
pTargetTables
);
}
static
bool
isSelectStmt
(
SNode
*
pCurrStmt
)
{
...
...
source/libs/scheduler/src/schRemote.c
浏览文件 @
92609ada
...
...
@@ -92,7 +92,7 @@ int32_t schHandleResponseMsg(SSchJob *pJob, SSchTask *pTask, int32_t execId, SDa
switch
(
msgType
)
{
case
TDMT_VND_COMMIT_RSP
:
{
SCH_ERR_JRET
(
rspCode
);
SCH_ERR_RET
(
schProcessOnTaskSuccess
(
pJob
,
pTask
));
SCH_ERR_
J
RET
(
schProcessOnTaskSuccess
(
pJob
,
pTask
));
break
;
}
case
TDMT_VND_CREATE_TABLE_RSP
:
{
...
...
@@ -118,7 +118,7 @@ int32_t schHandleResponseMsg(SSchJob *pJob, SSchTask *pTask, int32_t execId, SDa
SCH_ERR_JRET
(
rspCode
);
taosMemoryFreeClear
(
msg
);
SCH_ERR_RET
(
schProcessOnTaskSuccess
(
pJob
,
pTask
));
SCH_ERR_
J
RET
(
schProcessOnTaskSuccess
(
pJob
,
pTask
));
break
;
}
case
TDMT_VND_DROP_TABLE_RSP
:
{
...
...
@@ -144,7 +144,7 @@ int32_t schHandleResponseMsg(SSchJob *pJob, SSchTask *pTask, int32_t execId, SDa
SCH_ERR_JRET
(
rspCode
);
taosMemoryFreeClear
(
msg
);
SCH_ERR_RET
(
schProcessOnTaskSuccess
(
pJob
,
pTask
));
SCH_ERR_
J
RET
(
schProcessOnTaskSuccess
(
pJob
,
pTask
));
break
;
}
case
TDMT_VND_ALTER_TABLE_RSP
:
{
...
...
@@ -169,7 +169,7 @@ int32_t schHandleResponseMsg(SSchJob *pJob, SSchTask *pTask, int32_t execId, SDa
taosMemoryFreeClear
(
msg
);
SCH_ERR_RET
(
schProcessOnTaskSuccess
(
pJob
,
pTask
));
SCH_ERR_
J
RET
(
schProcessOnTaskSuccess
(
pJob
,
pTask
));
break
;
}
case
TDMT_VND_SUBMIT_RSP
:
{
...
...
@@ -218,7 +218,7 @@ int32_t schHandleResponseMsg(SSchJob *pJob, SSchTask *pTask, int32_t execId, SDa
taosMemoryFreeClear
(
msg
);
SCH_ERR_RET
(
schProcessOnTaskSuccess
(
pJob
,
pTask
));
SCH_ERR_
J
RET
(
schProcessOnTaskSuccess
(
pJob
,
pTask
));
break
;
}
...
...
@@ -238,7 +238,7 @@ int32_t schHandleResponseMsg(SSchJob *pJob, SSchTask *pTask, int32_t execId, SDa
taosMemoryFreeClear
(
msg
);
SCH_ERR_RET
(
schProcessOnTaskSuccess
(
pJob
,
pTask
));
SCH_ERR_
J
RET
(
schProcessOnTaskSuccess
(
pJob
,
pTask
));
break
;
}
...
...
@@ -263,7 +263,7 @@ int32_t schHandleResponseMsg(SSchJob *pJob, SSchTask *pTask, int32_t execId, SDa
taosMemoryFreeClear
(
msg
);
SCH_ERR_RET
(
schProcessOnTaskSuccess
(
pJob
,
pTask
));
SCH_ERR_
J
RET
(
schProcessOnTaskSuccess
(
pJob
,
pTask
));
break
;
}
...
...
@@ -379,13 +379,15 @@ int32_t schHandleCallback(void *param, SDataBuf *pMsg, int32_t rspCode) {
qDebug
(
"begin to handle rsp msg, type:%s, handle:%p, code:%s"
,
TMSG_INFO
(
pMsg
->
msgType
),
pMsg
->
handle
,
tstrerror
(
rspCode
));
SCH_ERR_RET
(
schProcessOnCbBegin
(
&
pJob
,
&
pTask
,
pParam
->
queryId
,
pParam
->
refId
,
pParam
->
taskId
));
SCH_ERR_
J
RET
(
schProcessOnCbBegin
(
&
pJob
,
&
pTask
,
pParam
->
queryId
,
pParam
->
refId
,
pParam
->
taskId
));
code
=
schHandleResponseMsg
(
pJob
,
pTask
,
pParam
->
execId
,
pMsg
,
rspCode
);
pMsg
->
pData
=
NULL
;
schProcessOnCbEnd
(
pJob
,
pTask
,
code
);
_return:
taosMemoryFreeClear
(
pMsg
->
pData
);
qDebug
(
"end to handle rsp msg, type:%s, handle:%p, code:%s"
,
TMSG_INFO
(
pMsg
->
msgType
),
pMsg
->
handle
,
...
...
@@ -398,6 +400,9 @@ int32_t schHandleDropCallback(void *param, SDataBuf *pMsg, int32_t code) {
SSchTaskCallbackParam
*
pParam
=
(
SSchTaskCallbackParam
*
)
param
;
qDebug
(
"QID:0x%"
PRIx64
",TID:0x%"
PRIx64
" drop task rsp received, code:0x%x"
,
pParam
->
queryId
,
pParam
->
taskId
,
code
);
if
(
pMsg
)
{
taosMemoryFree
(
pMsg
->
pData
);
}
return
TSDB_CODE_SUCCESS
;
}
...
...
@@ -408,6 +413,8 @@ int32_t schHandleLinkBrokenCallback(void *param, SDataBuf *pMsg, int32_t code) {
qDebug
(
"handle %p is broken"
,
pMsg
->
handle
);
if
(
head
->
isHbParam
)
{
taosMemoryFree
(
pMsg
->
pData
);
SSchHbCallbackParam
*
hbParam
=
(
SSchHbCallbackParam
*
)
param
;
SSchTrans
trans
=
{.
pTrans
=
hbParam
->
pTrans
,
.
pHandle
=
NULL
};
SCH_ERR_RET
(
schUpdateHbConnection
(
&
hbParam
->
nodeEpId
,
&
trans
));
...
...
source/libs/scheduler/src/schTask.c
浏览文件 @
92609ada
...
...
@@ -424,10 +424,15 @@ int32_t schHandleRedirect(SSchJob *pJob, SSchTask *pTask, SDataBuf *pData, int32
}
}
SCH_RET
(
schDoTaskRedirect
(
pJob
,
pTask
,
pData
,
rspCode
));
code
=
schDoTaskRedirect
(
pJob
,
pTask
,
pData
,
rspCode
);
taosMemoryFree
(
pData
->
pData
);
SCH_RET
(
code
);
_return:
taosMemoryFree
(
pData
->
pData
);
SCH_RET
(
schProcessOnTaskFailure
(
pJob
,
pTask
,
code
));
}
...
...
tests/script/tsim/valgrind/basic2.sim
浏览文件 @
92609ada
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c debugflag -v 131
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start -v
sql connect
print =============== step1: create drop show dnodes
...
...
@@ -42,53 +41,16 @@ while $i < $tbNum
sql insert into $tb values ($ms , $x , $x , $x )
$x = $x + 1
endw
$cc = $x * 60000
$ms = 1601481600000 + $cc
sql insert into $tb values ($ms , NULL , NULL , NULL )
$i = $i + 1
endw
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s start -v
print =============== step3: tb
sql select avg(tbcol) from tb1
sql select avg(tbcol) from tb1 where ts <= 1601481840000
sql select avg(tbcol) as b from tb1
sql select avg(tbcol) as b from tb1 interval(1d)
sql select avg(tbcol) as b from tb1 where ts <= 1601481840000 interval(1m)
sql select bottom(tbcol, 2) from tb1 where ts <= 1601481840000
sql select top(tbcol, 2) from tb1 where ts <= 1601481840000
sql select percentile(tbcol, 2) from tb1 where ts <= 1601481840000
sql select leastsquares(tbcol, 1, 1) as b from tb1 where ts <= 1601481840000
sql show table distributed tb1
sql select count(tbcol) as b from tb1 where ts <= 1601481840000 interval(1m)
sql select diff(tbcol) from tb1 where ts <= 1601481840000
sql select diff(tbcol) from tb1 where tbcol > 5 and tbcol < 20
sql select first(tbcol), last(tbcol) as b from tb1 where ts <= 1601481840000 interval(1m)
sql select count(tbcol), avg(tbcol), max(tbcol), min(tbcol), sum(tbcol), stddev(tbcol) from tb1 where ts <= 1601481840000 partition by tgcol interval(1m)
#sql select count(tbcol), avg(tbcol), max(tbcol), min(tbcol), count(tbcol) from tb1 where ts <= 1601481840000 and ts >= 1601481800000 partition by tgcol interval(1m) fill(value, 0)
sql select last_row(*) from tb1 where tbcol > 5 and tbcol < 20
print =============== step4: stb
sql select avg(tbcol) as c from stb
sql select avg(tbcol) as c from stb where ts <= 1601481840000
sql select avg(tbcol) as c from stb where tgcol < 5 and ts <= 1601481840000
sql select avg(tbcol) as c from stb interval(1m)
sql select avg(tbcol) as c from stb interval(1d)
sql select avg(tbcol) as b from stb where ts <= 1601481840000 interval(1m)
sql select avg(tbcol) as c from stb group by tgcol
sql select avg(tbcol) as b from stb where ts <= 1601481840000 partition by tgcol interval(1m)
sql show table distributed stb
sql select count(tbcol) as b from stb where ts <= 1601481840000 partition by tgcol interval(1m)
sql select diff(tbcol) from stb where ts <= 1601481840000
sql select first(tbcol), last(tbcol) as c from stb group by tgcol
sql select first(tbcol), last(tbcol) as b from stb where ts <= 1601481840000 and tbcol2 is null partition by tgcol interval(1m)
sql select first(tbcol), last(tbcol) as b from stb where ts <= 1601481840000 partition by tgcol interval(1m)
sql select count(tbcol), avg(tbcol), max(tbcol), min(tbcol), sum(tbcol), stddev(tbcol) from stb where ts <= 1601481840000 partition by tgcol interval(1m)
#sql select count(tbcol), avg(tbcol), max(tbcol), min(tbcol), count(tbcol) from stb where ts <= 1601481840000 and ts >= 1601481800000 partition by tgcol interval(1m) fill(value, 0)
sql select last_row(tbcol), stddev(tbcol) from stb where tbcol > 5 and tbcol < 20 group by tgcol
sql select * from tb1 where ts in ('2018-07-10 16:31:01', '2022-07-10 16:31:03', 1657441865000);
sql select * from tb1 where tbcol2 in (257);
sql select * from tb1 where tbcol3 in (2, 257);
sql select * from stb where ts in ('2018-07-10 16:31:01', '2022-07-10 16:31:03', 1657441865000);
sql select * from stb where tbcol2 in (257);
sql select * from stb where tbcol3 in (2, 257);
_OVER:
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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录