Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
b7bee06a
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1185
Star
22015
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b7bee06a
编写于
6月 18, 2020
作者:
B
Bomin Zhang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix coverity issues continue
上级
e83fd504
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
28 addition
and
26 deletion
+28
-26
src/client/src/tscSchemaUtil.c
src/client/src/tscSchemaUtil.c
+0
-1
src/client/src/tscSubquery.c
src/client/src/tscSubquery.c
+26
-23
src/client/src/tscSystem.c
src/client/src/tscSystem.c
+2
-2
未找到文件。
src/client/src/tscSchemaUtil.c
浏览文件 @
b7bee06a
...
...
@@ -32,7 +32,6 @@ int32_t tscGetNumOfTags(const STableMeta* pTableMeta) {
}
if
(
pTableMeta
->
tableType
==
TSDB_SUPER_TABLE
||
pTableMeta
->
tableType
==
TSDB_CHILD_TABLE
)
{
assert
(
tinfo
.
numOfTags
>=
0
);
return
tinfo
.
numOfTags
;
}
...
...
src/client/src/tscSubquery.c
浏览文件 @
b7bee06a
...
...
@@ -354,7 +354,7 @@ static int32_t tscLaunchSecondPhaseSubqueries(SSqlObj* pSql) {
}
size_t
numOfCols
=
taosArrayGetSize
(
pNewQueryInfo
->
colList
);
tscTrace
(
"%p subquery:%p tableIndex:%d, vgroupIndex:%d, type:%d, exprInfo:%
d, colList:%d
, fieldsInfo:%d, name:%s"
,
tscTrace
(
"%p subquery:%p tableIndex:%d, vgroupIndex:%d, type:%d, exprInfo:%
z, colList:%z
, fieldsInfo:%d, name:%s"
,
pSql
,
pNew
,
0
,
pTableMetaInfo
->
vgroupIndex
,
pNewQueryInfo
->
type
,
taosArrayGetSize
(
pNewQueryInfo
->
exprList
),
numOfCols
,
pNewQueryInfo
->
fieldsInfo
.
numOfOutput
,
pTableMetaInfo
->
name
);
}
...
...
@@ -551,7 +551,7 @@ static void issueTSCompQuery(SSqlObj* pSql, SJoinSupporter* pSupporter, SSqlObj*
tscTrace
(
"%p subquery:%p tableIndex:%d, vgroupIndex:%d, numOfVgroups:%d, type:%d, ts_comp query to retrieve timestamps, "
"numOfExpr:%
d, colList:%d
, numOfOutputFields:%d, name:%s"
,
"numOfExpr:%
z, colList:%z
, numOfOutputFields:%d, name:%s"
,
pParent
,
pSql
,
0
,
pTableMetaInfo
->
vgroupIndex
,
pTableMetaInfo
->
vgroupList
->
numOfVgroups
,
pQueryInfo
->
type
,
tscSqlExprNumOfExprs
(
pQueryInfo
),
numOfCols
,
pQueryInfo
->
fieldsInfo
.
numOfOutput
,
pTableMetaInfo
->
name
);
...
...
@@ -713,28 +713,31 @@ static void tidTagRetrieveCallback(void* param, TAOS_RES* tres, int32_t numOfRow
if
(
taosArrayGetSize
(
s1
)
==
0
||
taosArrayGetSize
(
s2
)
==
0
)
{
// no results,return.
tscTrace
(
"%p free all sub SqlObj and quit"
,
pParentSql
);
freeJoinSubqueryObj
(
pParentSql
);
return
;
}
// proceed to for ts_comp query
SSqlCmd
*
pSubCmd1
=
&
pParentSql
->
pSubs
[
0
]
->
cmd
;
SSqlCmd
*
pSubCmd2
=
&
pParentSql
->
pSubs
[
1
]
->
cmd
;
}
else
{
// proceed to for ts_comp query
SSqlCmd
*
pSubCmd1
=
&
pParentSql
->
pSubs
[
0
]
->
cmd
;
SSqlCmd
*
pSubCmd2
=
&
pParentSql
->
pSubs
[
1
]
->
cmd
;
SQueryInfo
*
pQueryInfo1
=
tscGetQueryInfoDetail
(
pSubCmd1
,
0
);
STableMetaInfo
*
pTableMetaInfo1
=
tscGetMetaInfo
(
pQueryInfo1
,
0
);
tscBuildVgroupTableInfo
(
pParentSql
,
pTableMetaInfo1
,
s1
);
SQueryInfo
*
pQueryInfo1
=
tscGetQueryInfoDetail
(
pSubCmd1
,
0
);
STableMetaInfo
*
pTableMetaInfo1
=
tscGetMetaInfo
(
pQueryInfo1
,
0
);
tscBuildVgroupTableInfo
(
pParentSql
,
pTableMetaInfo1
,
s1
);
SQueryInfo
*
pQueryInfo2
=
tscGetQueryInfoDetail
(
pSubCmd2
,
0
);
STableMetaInfo
*
pTableMetaInfo2
=
tscGetMetaInfo
(
pQueryInfo2
,
0
);
tscBuildVgroupTableInfo
(
pParentSql
,
pTableMetaInfo2
,
s2
);
SQueryInfo
*
pQueryInfo2
=
tscGetQueryInfoDetail
(
pSubCmd2
,
0
);
STableMetaInfo
*
pTableMetaInfo2
=
tscGetMetaInfo
(
pQueryInfo2
,
0
);
tscBuildVgroupTableInfo
(
pParentSql
,
pTableMetaInfo2
,
s2
);
pSupporter
->
pState
->
numOfTotal
=
2
;
pSupporter
->
pState
->
numOfRemain
=
pSupporter
->
pState
->
numOfTotal
;
pSupporter
->
pState
->
numOfTotal
=
2
;
pSupporter
->
pState
->
numOfRemain
=
pSupporter
->
pState
->
numOfTotal
;
for
(
int32_t
m
=
0
;
m
<
pParentSql
->
numOfSubs
;
++
m
)
{
SSqlObj
*
sub
=
pParentSql
->
pSubs
[
m
];
issueTSCompQuery
(
sub
,
sub
->
param
,
pParentSql
);
for
(
int32_t
m
=
0
;
m
<
pParentSql
->
numOfSubs
;
++
m
)
{
SSqlObj
*
sub
=
pParentSql
->
pSubs
[
m
];
issueTSCompQuery
(
sub
,
sub
->
param
,
pParentSql
);
}
}
taosArrayDestroy
(
s1
);
taosArrayDestroy
(
s2
);
}
static
void
tsCompRetrieveCallback
(
void
*
param
,
TAOS_RES
*
tres
,
int32_t
numOfRows
)
{
...
...
@@ -1242,7 +1245,7 @@ int32_t tscLaunchJoinSubquery(SSqlObj *pSql, int16_t tableIndex, SJoinSupporter
tscTrace
(
"%p subquery:%p tableIndex:%d, vgroupIndex:%d, type:%d, transfer to tid_tag query to retrieve (tableId, tags), "
"exprInfo:%
d, colList:%d
, fieldsInfo:%d, tagIndex:%d, name:%s"
,
"exprInfo:%
z, colList:%z
, fieldsInfo:%d, tagIndex:%d, name:%s"
,
pSql
,
pNew
,
tableIndex
,
pTableMetaInfo
->
vgroupIndex
,
pNewQueryInfo
->
type
,
tscSqlExprNumOfExprs
(
pNewQueryInfo
),
numOfCols
,
pNewQueryInfo
->
fieldsInfo
.
numOfOutput
,
index
.
columnIndex
,
pNewQueryInfo
->
pTableMetaInfo
[
0
]
->
name
);
}
else
{
...
...
@@ -1276,8 +1279,8 @@ int32_t tscLaunchJoinSubquery(SSqlObj *pSql, int16_t tableIndex, SJoinSupporter
size_t
numOfCols
=
taosArrayGetSize
(
pNewQueryInfo
->
colList
);
tscTrace
(
"%p subquery:%p tableIndex:%d, vgroupIndex:%d, type:%
d
, transfer to ts_comp query to retrieve timestamps, "
"exprInfo:%
d, colList:%d
, fieldsInfo:%d, name:%s"
,
"%p subquery:%p tableIndex:%d, vgroupIndex:%d, type:%
u
, transfer to ts_comp query to retrieve timestamps, "
"exprInfo:%
z, colList:%z
, fieldsInfo:%d, name:%s"
,
pSql
,
pNew
,
tableIndex
,
pTableMetaInfo
->
vgroupIndex
,
pNewQueryInfo
->
type
,
tscSqlExprNumOfExprs
(
pNewQueryInfo
),
numOfCols
,
pNewQueryInfo
->
fieldsInfo
.
numOfOutput
,
pNewQueryInfo
->
pTableMetaInfo
[
0
]
->
name
);
}
...
...
@@ -1699,7 +1702,7 @@ static void tscRetrieveFromDnodeCallBack(void *param, TAOS_RES *tres, int numOfR
assert
(
pRes
->
numOfRows
==
numOfRows
);
int64_t
num
=
atomic_add_fetch_64
(
&
pState
->
numOfRetrievedRows
,
numOfRows
);
tscTrace
(
"%p sub:%p retrieve numOfRows:%
d totalNumOfRows:%d
from ip:%s, orderOfSub:%d"
,
pPObj
,
pSql
,
tscTrace
(
"%p sub:%p retrieve numOfRows:%
"
PRId64
" totalNumOfRows:%"
PRIu64
"
from ip:%s, orderOfSub:%d"
,
pPObj
,
pSql
,
pRes
->
numOfRows
,
pState
->
numOfRetrievedRows
,
pSql
->
ipList
.
fqdn
[
pSql
->
ipList
.
inUse
],
idx
);
if
(
num
>
tsMaxNumOfOrderedResults
&&
tscIsProjectionQueryOnSTable
(
pQueryInfo
,
0
))
{
...
...
@@ -1827,7 +1830,7 @@ void tscRetrieveDataRes(void *param, TAOS_RES *tres, int code) {
}
if
(
pParentSql
->
res
.
code
!=
TSDB_CODE_SUCCESS
)
{
// at least one peer subquery failed, abort current query
tscTrace
(
"%p sub:%p query failed,ip:%
u
,vgId:%d,orderOfSub:%d,global code:%d"
,
pParentSql
,
pSql
,
tscTrace
(
"%p sub:%p query failed,ip:%
s
,vgId:%d,orderOfSub:%d,global code:%d"
,
pParentSql
,
pSql
,
pVgroup
->
ipAddr
[
0
].
fqdn
,
pVgroup
->
vgId
,
trsupport
->
subqueryIndex
,
pParentSql
->
res
.
code
);
tscHandleSubqueryError
(
param
,
tres
,
pParentSql
->
res
.
code
);
...
...
src/client/src/tscSystem.c
浏览文件 @
b7bee06a
...
...
@@ -220,7 +220,7 @@ static int taos_options_imp(TSDB_OPTION option, const char *pStr) {
if
(
strlen
(
tsLocale
)
==
0
)
{
// locale does not set yet
char
*
defaultLocale
=
setlocale
(
LC_CTYPE
,
""
);
strcpy
(
tsLocale
,
defaultLocale
);
tstrncpy
(
tsLocale
,
defaultLocale
,
sizeof
(
tsLocale
)
);
}
// set the user specified locale
...
...
@@ -304,7 +304,7 @@ static int taos_options_imp(TSDB_OPTION option, const char *pStr) {
assert
(
cfg
!=
NULL
);
if
(
cfg
->
cfgStatus
<=
TAOS_CFG_CSTATUS_OPTION
)
{
strcpy
(
tsTimezone
,
pStr
);
tstrncpy
(
tsTimezone
,
pStr
,
sizeof
(
tsTimezone
)
);
tsSetTimeZone
();
cfg
->
cfgStatus
=
TAOS_CFG_CSTATUS_OPTION
;
tscTrace
(
"timezone set:%s, input:%s by taos_options"
,
tsTimezone
,
pStr
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录