Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
d1d988a7
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看板
提交
d1d988a7
编写于
9月 08, 2022
作者:
S
slzhou
浏览文件
操作
浏览文件
下载
差异文件
Merge branch '2.6' of github.com:taosdata/TDengine into szhou/2.6/fixbugs
上级
8f001630
2742bf29
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
16 addition
and
18 deletion
+16
-18
src/client/src/tscProfile.c
src/client/src/tscProfile.c
+2
-11
src/client/src/tscSQLParser.c
src/client/src/tscSQLParser.c
+9
-1
src/client/src/tscServer.c
src/client/src/tscServer.c
+1
-1
src/client/src/tscSubquery.c
src/client/src/tscSubquery.c
+4
-5
未找到文件。
src/client/src/tscProfile.c
浏览文件 @
d1d988a7
...
...
@@ -283,18 +283,8 @@ int tscBuildQueryStreamDesc(void *pMsg, STscObj *pObj) {
// }
pthread_mutex_lock
(
&
pSql
->
subState
.
mutex
);
if
(
pSql
->
pSubs
!=
NULL
&&
pSql
->
subState
.
states
!=
NULL
)
{
for
(
int32_t
i
=
0
;
i
<
p
Qdesc
->
numOfSub
;
++
i
)
{
for
(
int32_t
i
=
0
;
i
<
p
Sql
->
subState
.
numOfSub
;
++
i
)
{
// because subState maybe free on anytime by any thread, check validate from here
if
(
pSql
->
subState
.
numOfSub
!=
pQdesc
->
numOfSub
||
pSql
->
pSubs
==
NULL
||
pSql
->
subState
.
states
==
NULL
)
{
tscError
(
" QUERY-HEART STscObj=%p subState maybe free. numOfSub=%d pSubs=%p states=%p"
,
pObj
,
pSql
->
subState
.
numOfSub
,
pSql
->
pSubs
,
pSql
->
subState
.
states
);
pQdesc
->
numOfSub
=
0
;
// break for
break
;
}
SSqlObj
*
psub
=
pSql
->
pSubs
[
i
];
int64_t
self
=
(
psub
!=
NULL
)
?
psub
->
self
:
0
;
...
...
@@ -307,6 +297,7 @@ int tscBuildQueryStreamDesc(void *pMsg, STscObj *pObj) {
p
+=
len
;
}
}
pQdesc
->
numOfSub
=
pSql
->
subState
.
numOfSub
;
pthread_mutex_unlock
(
&
pSql
->
subState
.
mutex
);
}
...
...
src/client/src/tscSQLParser.c
浏览文件 @
d1d988a7
...
...
@@ -8481,7 +8481,15 @@ static bool check_expr_in_groupby_colum(SGroupbyExpr* pGroupbyExpr, SExprInfo* p
return
false
;
for
(
int32_t
k
=
0
;
k
<
pGroupbyExpr
->
numOfGroupCols
;
++
k
)
{
pIndex
=
taosArrayGet
(
pGroupbyExpr
->
columnInfo
,
k
);
if
(
!
strcmp
(
pIndex
->
name
,
&
pExpr
->
base
.
colInfo
.
name
[
1
])){
// notes:first char is dot, skip one char.
// find last dot
char
*
name
=
strrchr
(
pExpr
->
base
.
colInfo
.
name
,
'.'
);
if
(
name
)
name
+=
1
;
else
name
=
pExpr
->
base
.
colInfo
.
name
;
if
(
!
strcmp
(
pIndex
->
name
,
name
)){
return
true
;
}
}
...
...
src/client/src/tscServer.c
浏览文件 @
d1d988a7
...
...
@@ -357,7 +357,7 @@ void checkBrokenQueries(STscObj *pTscObj) {
pthread_mutex_lock
(
&
pSql
->
subState
.
mutex
);
if
(
pSql
->
pSubs
)
{
// have sub sql
for
(
int
i
=
0
;
i
<
numOfSub
;
i
++
)
{
for
(
int
i
=
0
;
i
<
pSql
->
subState
.
numOfSub
;
i
++
)
{
SSqlObj
*
pSubSql
=
pSql
->
pSubs
[
i
];
if
(
pSubSql
)
{
tscInfo
(
"PROBE 0x%"
PRIx64
" sub sql app is 0x%"
PRIx64
,
pSql
->
self
,
pSubSql
->
self
);
...
...
src/client/src/tscSubquery.c
浏览文件 @
d1d988a7
...
...
@@ -101,13 +101,12 @@ static bool allSubqueryDone(SSqlObj *pParentSql) {
bool
subAndCheckDone
(
SSqlObj
*
pSql
,
SSqlObj
*
pParentSql
,
int
idx
)
{
SSubqueryState
*
subState
=
&
pParentSql
->
subState
;
assert
(
idx
<
subState
->
numOfSub
);
pthread_mutex_lock
(
&
subState
->
mutex
);
tscDebug
(
"0x%"
PRIx64
" subquery:0x%"
PRIx64
", id
x:%d state set to 1"
,
pParentSql
->
self
,
pSql
->
self
,
idx
);
subState
->
states
[
idx
]
=
1
;
if
(
idx
<
subState
->
numOfSub
)
{
tscDebug
(
"0x%"
PRIx64
" subquery:0x%"
PRIx64
", inde
x:%d state set to 1"
,
pParentSql
->
self
,
pSql
->
self
,
idx
);
subState
->
states
[
idx
]
=
1
;
}
bool
done
=
allSubqueryDone
(
pParentSql
);
if
(
!
done
)
{
tscDebug
(
"0x%"
PRIx64
" sub:%p,%d completed, total:%d"
,
pParentSql
->
self
,
pSql
,
idx
,
pParentSql
->
subState
.
numOfSub
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录