Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
yiicenne
TDengine
提交
e6b4aaf5
TDengine
项目概览
yiicenne
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e6b4aaf5
编写于
1月 21, 2021
作者:
D
dapan1121
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix bug
上级
5c88bf3e
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
35 addition
and
13 deletion
+35
-13
src/client/src/tscSubquery.c
src/client/src/tscSubquery.c
+35
-13
未找到文件。
src/client/src/tscSubquery.c
浏览文件 @
e6b4aaf5
...
...
@@ -582,13 +582,14 @@ void freeJoinSubqueryObj(SSqlObj* pSql) {
pSql
->
subState
.
numOfSub
=
0
;
}
static
void
quitAllSubquery
(
SSqlObj
*
pSqlSub
,
SSqlObj
*
pSqlObj
,
SJoinSupporter
*
pSupporter
)
{
static
int32_t
quitAllSubquery
(
SSqlObj
*
pSqlSub
,
SSqlObj
*
pSqlObj
,
SJoinSupporter
*
pSupporter
)
{
if
(
subAndCheckDone
(
pSqlSub
,
pSqlObj
,
pSupporter
->
subqueryIndex
))
{
tscError
(
"%p all subquery return and query failed, global code:%s"
,
pSqlObj
,
tstrerror
(
pSqlObj
->
res
.
code
));
freeJoinSubqueryObj
(
pSqlObj
);
return
;
return
0
;
}
return
1
;
//tscDestroyJoinSupporter(pSupporter);
}
...
...
@@ -835,7 +836,9 @@ static void tidTagRetrieveCallback(void* param, TAOS_RES* tres, int32_t numOfRow
if
(
pParentSql
->
res
.
code
!=
TSDB_CODE_SUCCESS
)
{
tscError
(
"%p abort query due to other subquery failure. code:%d, global code:%d"
,
pSql
,
numOfRows
,
pParentSql
->
res
.
code
);
quitAllSubquery
(
pSql
,
pParentSql
,
pSupporter
);
if
(
quitAllSubquery
(
pSql
,
pParentSql
,
pSupporter
))
{
return
;
}
tscAsyncResultOnError
(
pParentSql
);
...
...
@@ -850,7 +853,9 @@ static void tidTagRetrieveCallback(void* param, TAOS_RES* tres, int32_t numOfRow
tscError
(
"%p sub query failed, code:%s, index:%d"
,
pSql
,
tstrerror
(
numOfRows
),
pSupporter
->
subqueryIndex
);
pParentSql
->
res
.
code
=
numOfRows
;
quitAllSubquery
(
pSql
,
pParentSql
,
pSupporter
);
if
(
quitAllSubquery
(
pSql
,
pParentSql
,
pSupporter
))
{
return
;
}
tscAsyncResultOnError
(
pParentSql
);
return
;
...
...
@@ -867,7 +872,9 @@ static void tidTagRetrieveCallback(void* param, TAOS_RES* tres, int32_t numOfRow
tscError
(
"%p failed to malloc memory"
,
pSql
);
pParentSql
->
res
.
code
=
TAOS_SYSTEM_ERROR
(
errno
);
quitAllSubquery
(
pSql
,
pParentSql
,
pSupporter
);
if
(
quitAllSubquery
(
pSql
,
pParentSql
,
pSupporter
))
{
return
;
}
tscAsyncResultOnError
(
pParentSql
);
return
;
...
...
@@ -985,7 +992,9 @@ static void tsCompRetrieveCallback(void* param, TAOS_RES* tres, int32_t numOfRow
if
(
pParentSql
->
res
.
code
!=
TSDB_CODE_SUCCESS
)
{
tscError
(
"%p abort query due to other subquery failure. code:%d, global code:%d"
,
pSql
,
numOfRows
,
pParentSql
->
res
.
code
);
quitAllSubquery
(
pSql
,
pParentSql
,
pSupporter
);
if
(
quitAllSubquery
(
pSql
,
pParentSql
,
pSupporter
)){
return
;
}
tscAsyncResultOnError
(
pParentSql
);
...
...
@@ -999,7 +1008,9 @@ static void tsCompRetrieveCallback(void* param, TAOS_RES* tres, int32_t numOfRow
tscError
(
"%p sub query failed, code:%s, index:%d"
,
pSql
,
tstrerror
(
numOfRows
),
pSupporter
->
subqueryIndex
);
pParentSql
->
res
.
code
=
numOfRows
;
quitAllSubquery
(
pSql
,
pParentSql
,
pSupporter
);
if
(
quitAllSubquery
(
pSql
,
pParentSql
,
pSupporter
)){
return
;
}
tscAsyncResultOnError
(
pParentSql
);
return
;
...
...
@@ -1014,7 +1025,9 @@ static void tsCompRetrieveCallback(void* param, TAOS_RES* tres, int32_t numOfRow
pParentSql
->
res
.
code
=
TAOS_SYSTEM_ERROR
(
errno
);
quitAllSubquery
(
pSql
,
pParentSql
,
pSupporter
);
if
(
quitAllSubquery
(
pSql
,
pParentSql
,
pSupporter
))
{
return
;
}
tscAsyncResultOnError
(
pParentSql
);
...
...
@@ -1032,7 +1045,9 @@ static void tsCompRetrieveCallback(void* param, TAOS_RES* tres, int32_t numOfRow
pParentSql
->
res
.
code
=
TAOS_SYSTEM_ERROR
(
errno
);
quitAllSubquery
(
pSql
,
pParentSql
,
pSupporter
);
if
(
quitAllSubquery
(
pSql
,
pParentSql
,
pSupporter
)){
return
;
}
tscAsyncResultOnError
(
pParentSql
);
...
...
@@ -1129,8 +1144,10 @@ static void joinRetrieveFinalResCallback(void* param, TAOS_RES* tres, int numOfR
if
(
pParentSql
->
res
.
code
!=
TSDB_CODE_SUCCESS
)
{
tscError
(
"%p abort query due to other subquery failure. code:%d, global code:%d"
,
pSql
,
numOfRows
,
pParentSql
->
res
.
code
);
quitAllSubquery
(
pSql
,
pParentSql
,
pSupporter
);
if
(
quitAllSubquery
(
pSql
,
pParentSql
,
pSupporter
))
{
return
;
}
tscAsyncResultOnError
(
pParentSql
);
return
;
...
...
@@ -1472,7 +1489,9 @@ void tscJoinQueryCallback(void* param, TAOS_RES* tres, int code) {
// retrieve actual query results from vnode during the second stage join subquery
if
(
pParentSql
->
res
.
code
!=
TSDB_CODE_SUCCESS
)
{
tscError
(
"%p abort query due to other subquery failure. code:%d, global code:%d"
,
pSql
,
code
,
pParentSql
->
res
.
code
);
quitAllSubquery
(
pSql
,
pParentSql
,
pSupporter
);
if
(
quitAllSubquery
(
pSql
,
pParentSql
,
pSupporter
))
{
return
;
}
tscAsyncResultOnError
(
pParentSql
);
...
...
@@ -1486,7 +1505,10 @@ void tscJoinQueryCallback(void* param, TAOS_RES* tres, int code) {
tscError
(
"%p abort query, code:%s, global code:%s"
,
pSql
,
tstrerror
(
code
),
tstrerror
(
pParentSql
->
res
.
code
));
pParentSql
->
res
.
code
=
code
;
quitAllSubquery
(
pSql
,
pParentSql
,
pSupporter
);
if
(
quitAllSubquery
(
pSql
,
pParentSql
,
pSupporter
))
{
return
;
}
tscAsyncResultOnError
(
pParentSql
);
return
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录