Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
KASAKI11
TDengine
提交
77212096
T
TDengine
项目概览
KASAKI11
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
77212096
编写于
4月 04, 2020
作者:
S
slguan
提交者:
GitHub
4月 04, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1511 from taosdata/feature/query
[td-98] suppress warnings
上级
92cf7c42
3826deff
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
14 addition
and
16 deletion
+14
-16
src/query/src/qast.c
src/query/src/qast.c
+3
-3
src/util/src/ihash.c
src/util/src/ihash.c
+2
-4
src/vnode/tsdb/src/tsdbRead.c
src/vnode/tsdb/src/tsdbRead.c
+9
-9
未找到文件。
src/query/src/qast.c
浏览文件 @
77212096
...
...
@@ -926,7 +926,7 @@ void tSQLBinaryExprTrv(tExprNode *pExprs, int32_t *val, int16_t *ids) {
}
}
static
int32_t
exprTreeToBinaryImpl
(
tExprNode
*
pExprTree
,
SBuffer
*
pBuf
)
{
static
void
exprTreeToBinaryImpl
(
tExprNode
*
pExprTree
,
SBuffer
*
pBuf
)
{
tbufWrite
(
pBuf
,
&
pExprTree
->
nodeType
,
sizeof
(
pExprTree
->
nodeType
));
if
(
pExprTree
->
nodeType
==
TSQL_NODE_VALUE
)
{
...
...
@@ -973,7 +973,7 @@ SBuffer exprTreeToBinary(tExprNode* pExprTree) {
return
buf
;
}
static
tExprNode
*
exprTreeFromBinaryImpl
(
tExprNode
**
pExprTree
,
SBuffer
*
pBuf
)
{
static
void
exprTreeFromBinaryImpl
(
tExprNode
**
pExprTree
,
SBuffer
*
pBuf
)
{
tExprNode
*
pExpr
=
calloc
(
1
,
sizeof
(
tExprNode
));
tbufReadToBuffer
(
pBuf
,
&
pExpr
->
nodeType
,
sizeof
(
pExpr
->
nodeType
));
...
...
@@ -1014,7 +1014,7 @@ static tExprNode* exprTreeFromBinaryImpl(tExprNode** pExprTree, SBuffer* pBuf) {
tExprNode
*
exprTreeFromBinary
(
const
void
*
pBuf
,
size_t
size
)
{
SBuffer
rbuf
=
{
0
};
int32_t
code
=
tbufBeginRead
(
&
rbuf
,
pBuf
,
size
);
/*int32_t code =*/
tbufBeginRead
(
&
rbuf
,
pBuf
,
size
);
tExprNode
*
pExprNode
=
NULL
;
exprTreeFromBinaryImpl
(
&
pExprNode
,
&
rbuf
);
...
...
src/util/src/ihash.c
浏览文件 @
77212096
...
...
@@ -221,10 +221,9 @@ void taosCleanUpIntHashWithFp(void *handle, void (*fp)(char *)) {
void
taosVisitIntHashWithFp
(
void
*
handle
,
int
(
*
fp
)(
char
*
,
void
*
),
void
*
param
)
{
IHashObj
*
pObj
;
IHashNode
*
pNode
,
*
pNext
;
char
*
pData
=
NULL
;
pObj
=
(
IHashObj
*
)
handle
;
if
(
pObj
==
NULL
||
pObj
->
maxSessions
<=
0
)
return
NULL
;
if
(
pObj
==
NULL
||
pObj
->
maxSessions
<=
0
)
return
;
pthread_mutex_lock
(
&
pObj
->
mutex
);
...
...
@@ -245,11 +244,10 @@ void taosVisitIntHashWithFp(void *handle, int (*fp)(char *, void *), void *param
int32_t
taosGetIntHashSize
(
void
*
handle
)
{
IHashObj
*
pObj
;
IHashNode
*
pNode
,
*
pNext
;
char
*
pData
=
NULL
;
int32_t
num
=
0
;
pObj
=
(
IHashObj
*
)
handle
;
if
(
pObj
==
NULL
||
pObj
->
maxSessions
<=
0
)
return
NULL
;
if
(
pObj
==
NULL
||
pObj
->
maxSessions
<=
0
)
return
0
;
pthread_mutex_lock
(
&
pObj
->
mutex
);
...
...
src/vnode/tsdb/src/tsdbRead.c
浏览文件 @
77212096
...
...
@@ -444,6 +444,7 @@ static bool doLoadDataFromFileBlock(STsdbQueryHandle *pQueryHandle) {
}
tsdbLoadDataBlock
(
pFile
,
pBlock
,
1
,
pCheckInfo
->
pDataCols
,
data
);
return
true
;
}
static
bool
loadQualifiedDataFromFileBlock
(
STsdbQueryHandle
*
pQueryHandle
)
{
...
...
@@ -484,7 +485,7 @@ bool moveToNextBlock(STsdbQueryHandle *pQueryHandle, int32_t step) {
(
pQueryHandle
->
cur
.
slot
==
pCheckInfo
->
compIndex
[
tid
].
numOfSuperBlocks
-
1
))
||
(
step
==
QUERY_DESC_FORWARD_STEP
&&
(
pQueryHandle
->
cur
.
slot
==
0
)))
{
// temporarily keep the position value, in case of no data qualified when move forwards(backwards)
SQueryFilePos
save
=
pQueryHandle
->
cur
;
//
SQueryFilePos save = pQueryHandle->cur;
SFileGroup
*
fgroup
=
tsdbGetFileGroupNext
(
&
pCheckInfo
->
fileIter
);
int32_t
fid
=
-
1
;
...
...
@@ -524,6 +525,8 @@ bool moveToNextBlock(STsdbQueryHandle *pQueryHandle, int32_t step) {
}
else
{
// data in cache
return
hasMoreDataInCacheForSingleModel
(
pQueryHandle
);
}
return
false
;
}
int
vnodeBinarySearchKey
(
char
*
pValue
,
int
num
,
TSKEY
key
,
int
order
)
{
...
...
@@ -751,8 +754,6 @@ static bool getQualifiedDataBlock(STsdbQueryHandle *pQueryHandle, STableCheckInf
break
;
}
SFile
*
pFile
=
&
pCheckInfo
->
pFileGroup
->
files
[
TSDB_FILE_TYPE_DATA
];
// no data block in current file, try next
if
(
pCheckInfo
->
compIndex
[
tid
].
numOfSuperBlocks
==
0
)
{
dTrace
(
"QInfo:%p no data block in file, fid:%d, tid:%d, try next"
,
pQueryHandle
->
qinfo
,
...
...
@@ -836,7 +837,7 @@ static bool hasMoreDataInFileForSingleTableModel(STsdbQueryHandle* pHandle) {
assert
(
pHandle
->
activeIndex
==
0
&&
taosArrayGetSize
(
pHandle
->
pTableCheckInfo
)
==
1
);
STsdbFileH
*
pFileHandle
=
tsdbGetFile
(
pHandle
->
pTsdb
);
SQueryFilePos
*
cur
=
&
pHandle
->
cur
;
//
SQueryFilePos* cur = &pHandle->cur;
STableCheckInfo
*
pCheckInfo
=
taosArrayGet
(
pHandle
->
pTableCheckInfo
,
pHandle
->
activeIndex
);
...
...
@@ -1329,20 +1330,19 @@ static int32_t doQueryTableList(STable* pSTable, SArray* pRes, const char* pCond
return
TSDB_CODE_SUCCESS
;
}
// SArray *tsdbQueryTableList(struct STsdbRepo* tsdb, int64_t uid, const wchar_t *pTagCond, size_t len) {
SArray
*
tsdbQueryTableList
(
tsdb_repo_t
*
tsdb
,
int64_t
uid
,
const
wchar_t
*
pTagCond
,
size_t
len
)
{
// no condition, all tables created according to the stable will involved in querying
SArray
*
result
=
taosArrayInit
(
8
,
POINTER_BYTES
);
if
(
pTagCond
==
NULL
||
wcslen
(
pTagCond
)
==
0
)
{
return
createTableIdArrayList
(
tsdb
,
uid
);
}
else
{
char
*
str
=
convertTagQueryStr
(
pTagCond
,
len
);
SArray
*
result
=
taosArrayInit
(
8
,
POINTER_BYTES
);
STable
*
pSTable
=
tsdbGetTableByUid
(
tsdbGetMeta
(
tsdb
),
uid
);
assert
(
pSTable
!=
NULL
);
if
(
doQueryTableList
(
pSTable
,
result
,
str
)
==
TSDB_CODE_SUCCESS
)
{
doQueryTableList
(
pSTable
,
result
,
str
);
return
result
;
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录