Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
9b644fcb
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看板
提交
9b644fcb
编写于
3月 07, 2023
作者:
D
dapan1121
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: add debug log
上级
ad4db989
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
10 addition
and
1 deletion
+10
-1
src/client/src/tscSubquery.c
src/client/src/tscSubquery.c
+7
-0
src/client/src/tscUtil.c
src/client/src/tscUtil.c
+3
-1
未找到文件。
src/client/src/tscSubquery.c
浏览文件 @
9b644fcb
...
@@ -1631,6 +1631,8 @@ static void joinRetrieveFinalResCallback(void* param, TAOS_RES* tres, int numOfR
...
@@ -1631,6 +1631,8 @@ static void joinRetrieveFinalResCallback(void* param, TAOS_RES* tres, int numOfR
SJoinSupporter
*
pSupporter
=
(
SJoinSupporter
*
)
param
;
SJoinSupporter
*
pSupporter
=
(
SJoinSupporter
*
)
param
;
int64_t
handle
=
pSupporter
->
pObj
;
int64_t
handle
=
pSupporter
->
pObj
;
tscDebug
(
"***enter joinRetrieveFinalResCallback"
);
SSqlObj
*
pParentSql
=
(
SSqlObj
*
)
taosAcquireRef
(
tscObjRef
,
handle
);
SSqlObj
*
pParentSql
=
(
SSqlObj
*
)
taosAcquireRef
(
tscObjRef
,
handle
);
if
(
pParentSql
==
NULL
)
return
;
if
(
pParentSql
==
NULL
)
return
;
...
@@ -1750,6 +1752,7 @@ void tscFetchDatablockForSubquery(SSqlObj* pSql) {
...
@@ -1750,6 +1752,7 @@ void tscFetchDatablockForSubquery(SSqlObj* pSql) {
bool
hasData
=
true
;
bool
hasData
=
true
;
bool
reachLimit
=
false
;
bool
reachLimit
=
false
;
tscDebug
(
"***enter tscFetchDatablockForSubquery"
);
{
pthread_mutex_lock
(
&
pSql
->
subState
.
mutex
);
{
pthread_mutex_lock
(
&
pSql
->
subState
.
mutex
);
assert
(
pSql
->
subState
.
numOfSub
>=
1
);
assert
(
pSql
->
subState
.
numOfSub
>=
1
);
...
@@ -1788,6 +1791,7 @@ void tscFetchDatablockForSubquery(SSqlObj* pSql) {
...
@@ -1788,6 +1791,7 @@ void tscFetchDatablockForSubquery(SSqlObj* pSql) {
// has data remains in client side, and continue to return data to app
// has data remains in client side, and continue to return data to app
if
(
hasData
)
{
if
(
hasData
)
{
tscDebug
(
"*hasData"
);
tscBuildResFromSubqueries
(
pSql
);
tscBuildResFromSubqueries
(
pSql
);
return
;
return
;
}
}
...
@@ -1795,6 +1799,7 @@ void tscFetchDatablockForSubquery(SSqlObj* pSql) {
...
@@ -1795,6 +1799,7 @@ void tscFetchDatablockForSubquery(SSqlObj* pSql) {
// If at least one subquery is completed in current vnode, try the next vnode in case of multi-vnode
// If at least one subquery is completed in current vnode, try the next vnode in case of multi-vnode
// super table projection query.
// super table projection query.
if
(
reachLimit
)
{
if
(
reachLimit
)
{
tscDebug
(
"*reachLimit"
);
pSql
->
res
.
completed
=
true
;
pSql
->
res
.
completed
=
true
;
freeJoinSubqueryObj
(
pSql
);
freeJoinSubqueryObj
(
pSql
);
...
@@ -3808,6 +3813,7 @@ static void doBuildResFromSubqueries(SSqlObj* pSql) {
...
@@ -3808,6 +3813,7 @@ static void doBuildResFromSubqueries(SSqlObj* pSql) {
pthread_mutex_unlock
(
&
pSql
->
subState
.
mutex
);
}
pthread_mutex_unlock
(
&
pSql
->
subState
.
mutex
);
}
if
(
numOfRes
==
0
)
{
// no result any more, free all subquery objects
if
(
numOfRes
==
0
)
{
// no result any more, free all subquery objects
tscDebug
(
"*******query complete"
);
pSql
->
res
.
completed
=
true
;
pSql
->
res
.
completed
=
true
;
freeJoinSubqueryObj
(
pSql
);
freeJoinSubqueryObj
(
pSql
);
return
;
return
;
...
@@ -3892,6 +3898,7 @@ static void doBuildResFromSubqueries(SSqlObj* pSql) {
...
@@ -3892,6 +3898,7 @@ static void doBuildResFromSubqueries(SSqlObj* pSql) {
void
tscBuildResFromSubqueries
(
SSqlObj
*
pSql
)
{
void
tscBuildResFromSubqueries
(
SSqlObj
*
pSql
)
{
SSqlRes
*
pRes
=
&
pSql
->
res
;
SSqlRes
*
pRes
=
&
pSql
->
res
;
tscDebug
(
"*enter tscBuildResFromSubqueries"
);
if
(
pRes
->
code
!=
TSDB_CODE_SUCCESS
)
{
if
(
pRes
->
code
!=
TSDB_CODE_SUCCESS
)
{
tscAsyncResultOnError
(
pSql
);
tscAsyncResultOnError
(
pSql
);
return
;
return
;
...
...
src/client/src/tscUtil.c
浏览文件 @
9b644fcb
...
@@ -4561,7 +4561,9 @@ int32_t tscErrorMsgWithCode(int32_t code, char* dstBuffer, const char* errMsg, c
...
@@ -4561,7 +4561,9 @@ int32_t tscErrorMsgWithCode(int32_t code, char* dstBuffer, const char* errMsg, c
bool
tscHasReachLimitation
(
SQueryInfo
*
pQueryInfo
,
SSqlRes
*
pRes
)
{
bool
tscHasReachLimitation
(
SQueryInfo
*
pQueryInfo
,
SSqlRes
*
pRes
)
{
assert
(
pQueryInfo
!=
NULL
&&
pQueryInfo
->
clauseLimit
!=
0
);
assert
(
pQueryInfo
!=
NULL
&&
pQueryInfo
->
clauseLimit
!=
0
);
return
(
pQueryInfo
->
clauseLimit
>
0
&&
pRes
->
numOfClauseTotal
>=
pQueryInfo
->
clauseLimit
);
bool
reachLimit
=
(
pQueryInfo
->
clauseLimit
>
0
&&
pRes
->
numOfClauseTotal
>=
pQueryInfo
->
clauseLimit
);
tscDebug
(
"reachLimit:%d"
,
reachLimit
);
return
reachLimit
;
}
}
char
*
tscGetErrorMsgPayload
(
SSqlCmd
*
pCmd
)
{
return
pCmd
->
payload
;
}
char
*
tscGetErrorMsgPayload
(
SSqlCmd
*
pCmd
)
{
return
pCmd
->
payload
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录