Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
e118dc87
T
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1192
Star
22018
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看板
提交
e118dc87
编写于
9月 22, 2020
作者:
H
Hongze Cheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
TD-1194
上级
c126e6be
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
13 addition
and
13 deletion
+13
-13
src/query/src/qAst.c
src/query/src/qAst.c
+10
-10
src/tsdb/src/tsdbMeta.c
src/tsdb/src/tsdbMeta.c
+3
-3
未找到文件。
src/query/src/qAst.c
浏览文件 @
e118dc87
...
@@ -432,7 +432,7 @@ static void tQueryIndexColumn(SSkipList* pSkipList, tQueryInfo* pQueryInfo, SArr
...
@@ -432,7 +432,7 @@ static void tQueryIndexColumn(SSkipList* pSkipList, tQueryInfo* pQueryInfo, SArr
break
;
break
;
}
}
STableKeyInfo
info
=
{.
pTable
=
*
(
void
*
*
)
SL_GET_NODE_DATA
(
pNode
),
.
lastKey
=
TSKEY_INITIAL_VAL
};
STableKeyInfo
info
=
{.
pTable
=
(
void
*
)
SL_GET_NODE_DATA
(
pNode
),
.
lastKey
=
TSKEY_INITIAL_VAL
};
taosArrayPush
(
result
,
&
info
);
taosArrayPush
(
result
,
&
info
);
}
}
}
else
if
(
optr
==
TSDB_RELATION_GREATER
||
optr
==
TSDB_RELATION_GREATER_EQUAL
)
{
// greater equal
}
else
if
(
optr
==
TSDB_RELATION_GREATER
||
optr
==
TSDB_RELATION_GREATER_EQUAL
)
{
// greater equal
...
@@ -450,7 +450,7 @@ static void tQueryIndexColumn(SSkipList* pSkipList, tQueryInfo* pQueryInfo, SArr
...
@@ -450,7 +450,7 @@ static void tQueryIndexColumn(SSkipList* pSkipList, tQueryInfo* pQueryInfo, SArr
if
(
ret
==
0
&&
optr
==
TSDB_RELATION_GREATER
)
{
if
(
ret
==
0
&&
optr
==
TSDB_RELATION_GREATER
)
{
continue
;
continue
;
}
else
{
}
else
{
STableKeyInfo
info
=
{.
pTable
=
*
(
void
*
*
)
SL_GET_NODE_DATA
(
pNode
),
.
lastKey
=
TSKEY_INITIAL_VAL
};
STableKeyInfo
info
=
{.
pTable
=
(
void
*
)
SL_GET_NODE_DATA
(
pNode
),
.
lastKey
=
TSKEY_INITIAL_VAL
};
taosArrayPush
(
result
,
&
info
);
taosArrayPush
(
result
,
&
info
);
comp
=
false
;
comp
=
false
;
}
}
...
@@ -465,7 +465,7 @@ static void tQueryIndexColumn(SSkipList* pSkipList, tQueryInfo* pQueryInfo, SArr
...
@@ -465,7 +465,7 @@ static void tQueryIndexColumn(SSkipList* pSkipList, tQueryInfo* pQueryInfo, SArr
continue
;
continue
;
}
}
STableKeyInfo
info
=
{.
pTable
=
*
(
void
*
*
)
SL_GET_NODE_DATA
(
pNode
),
.
lastKey
=
TSKEY_INITIAL_VAL
};
STableKeyInfo
info
=
{.
pTable
=
(
void
*
)
SL_GET_NODE_DATA
(
pNode
),
.
lastKey
=
TSKEY_INITIAL_VAL
};
taosArrayPush
(
result
,
&
info
);
taosArrayPush
(
result
,
&
info
);
}
}
...
@@ -476,11 +476,11 @@ static void tQueryIndexColumn(SSkipList* pSkipList, tQueryInfo* pQueryInfo, SArr
...
@@ -476,11 +476,11 @@ static void tQueryIndexColumn(SSkipList* pSkipList, tQueryInfo* pQueryInfo, SArr
while
(
tSkipListIterNext
(
iter
))
{
while
(
tSkipListIterNext
(
iter
))
{
SSkipListNode
*
pNode
=
tSkipListIterGet
(
iter
);
SSkipListNode
*
pNode
=
tSkipListIterGet
(
iter
);
comp
=
comp
&&
(
pQueryInfo
->
compare
(
SL_GET_NODE_KEY
(
pSkipList
,
pNode
),
cond
.
start
->
v
)
==
0
);
comp
=
comp
&&
(
pQueryInfo
->
compare
(
SL_GET_NODE_KEY
(
pSkipList
,
pNode
),
cond
.
start
->
v
)
==
0
);
if
(
comp
)
{
if
(
comp
)
{
continue
;
continue
;
}
}
STableKeyInfo
info
=
{.
pTable
=
*
(
void
*
*
)
SL_GET_NODE_DATA
(
pNode
),
.
lastKey
=
TSKEY_INITIAL_VAL
};
STableKeyInfo
info
=
{.
pTable
=
(
void
*
)
SL_GET_NODE_DATA
(
pNode
),
.
lastKey
=
TSKEY_INITIAL_VAL
};
taosArrayPush
(
result
,
&
info
);
taosArrayPush
(
result
,
&
info
);
}
}
...
@@ -504,7 +504,7 @@ static void tQueryIndexColumn(SSkipList* pSkipList, tQueryInfo* pQueryInfo, SArr
...
@@ -504,7 +504,7 @@ static void tQueryIndexColumn(SSkipList* pSkipList, tQueryInfo* pQueryInfo, SArr
if
(
ret
==
0
&&
optr
==
TSDB_RELATION_LESS
)
{
if
(
ret
==
0
&&
optr
==
TSDB_RELATION_LESS
)
{
continue
;
continue
;
}
else
{
}
else
{
STableKeyInfo
info
=
{.
pTable
=
*
(
void
*
*
)
SL_GET_NODE_DATA
(
pNode
),
.
lastKey
=
TSKEY_INITIAL_VAL
};
STableKeyInfo
info
=
{.
pTable
=
(
void
*
)
SL_GET_NODE_DATA
(
pNode
),
.
lastKey
=
TSKEY_INITIAL_VAL
};
taosArrayPush
(
result
,
&
info
);
taosArrayPush
(
result
,
&
info
);
comp
=
false
;
// no need to compare anymore
comp
=
false
;
// no need to compare anymore
}
}
...
@@ -518,7 +518,7 @@ static void tQueryIndexColumn(SSkipList* pSkipList, tQueryInfo* pQueryInfo, SArr
...
@@ -518,7 +518,7 @@ static void tQueryIndexColumn(SSkipList* pSkipList, tQueryInfo* pQueryInfo, SArr
bool
isnull
=
isNull
(
SL_GET_NODE_KEY
(
pSkipList
,
pNode
),
pQueryInfo
->
sch
.
type
);
bool
isnull
=
isNull
(
SL_GET_NODE_KEY
(
pSkipList
,
pNode
),
pQueryInfo
->
sch
.
type
);
if
((
pQueryInfo
->
optr
==
TSDB_RELATION_ISNULL
&&
isnull
)
||
if
((
pQueryInfo
->
optr
==
TSDB_RELATION_ISNULL
&&
isnull
)
||
(
pQueryInfo
->
optr
==
TSDB_RELATION_NOTNULL
&&
(
!
isnull
)))
{
(
pQueryInfo
->
optr
==
TSDB_RELATION_NOTNULL
&&
(
!
isnull
)))
{
STableKeyInfo
info
=
{.
pTable
=
*
(
void
*
*
)
SL_GET_NODE_DATA
(
pNode
),
.
lastKey
=
TSKEY_INITIAL_VAL
};
STableKeyInfo
info
=
{.
pTable
=
(
void
*
)
SL_GET_NODE_DATA
(
pNode
),
.
lastKey
=
TSKEY_INITIAL_VAL
};
taosArrayPush
(
result
,
&
info
);
taosArrayPush
(
result
,
&
info
);
}
}
}
}
...
@@ -684,7 +684,7 @@ static void tSQLBinaryTraverseOnSkipList(tExprNode *pExpr, SArray *pResult, SSki
...
@@ -684,7 +684,7 @@ static void tSQLBinaryTraverseOnSkipList(tExprNode *pExpr, SArray *pResult, SSki
while
(
tSkipListIterNext
(
iter
))
{
while
(
tSkipListIterNext
(
iter
))
{
SSkipListNode
*
pNode
=
tSkipListIterGet
(
iter
);
SSkipListNode
*
pNode
=
tSkipListIterGet
(
iter
);
if
(
filterItem
(
pExpr
,
pNode
,
param
))
{
if
(
filterItem
(
pExpr
,
pNode
,
param
))
{
taosArrayPush
(
pResult
,
SL_GET_NODE_DATA
(
pNode
));
taosArrayPush
(
pResult
,
&
(
SL_GET_NODE_DATA
(
pNode
)
));
}
}
}
}
tSkipListDestroyIter
(
iter
);
tSkipListDestroyIter
(
iter
);
...
@@ -699,7 +699,7 @@ static void tQueryIndexlessColumn(SSkipList* pSkipList, tQueryInfo* pQueryInfo,
...
@@ -699,7 +699,7 @@ static void tQueryIndexlessColumn(SSkipList* pSkipList, tQueryInfo* pQueryInfo,
SSkipListNode
*
pNode
=
tSkipListIterGet
(
iter
);
SSkipListNode
*
pNode
=
tSkipListIterGet
(
iter
);
char
*
pData
=
SL_GET_NODE_DATA
(
pNode
);
char
*
pData
=
SL_GET_NODE_DATA
(
pNode
);
tstr
*
name
=
(
tstr
*
)
tsdbGetTableName
(
*
(
void
*
*
)
pData
);
tstr
*
name
=
(
tstr
*
)
tsdbGetTableName
(
(
void
*
)
pData
);
// todo speed up by using hash
// todo speed up by using hash
if
(
pQueryInfo
->
sch
.
colId
==
TSDB_TBNAME_COLUMN_INDEX
)
{
if
(
pQueryInfo
->
sch
.
colId
==
TSDB_TBNAME_COLUMN_INDEX
)
{
...
@@ -713,7 +713,7 @@ static void tQueryIndexlessColumn(SSkipList* pSkipList, tQueryInfo* pQueryInfo,
...
@@ -713,7 +713,7 @@ static void tQueryIndexlessColumn(SSkipList* pSkipList, tQueryInfo* pQueryInfo,
}
}
if
(
addToResult
)
{
if
(
addToResult
)
{
STableKeyInfo
info
=
{.
pTable
=
*
(
void
*
*
)
pData
,
.
lastKey
=
TSKEY_INITIAL_VAL
};
STableKeyInfo
info
=
{.
pTable
=
(
void
*
)
pData
,
.
lastKey
=
TSKEY_INITIAL_VAL
};
taosArrayPush
(
res
,
&
info
);
taosArrayPush
(
res
,
&
info
);
}
}
}
}
...
...
src/tsdb/src/tsdbMeta.c
浏览文件 @
e118dc87
...
@@ -925,7 +925,7 @@ static int tsdbRemoveTableFromIndex(STsdbMeta *pMeta, STable *pTable) {
...
@@ -925,7 +925,7 @@ static int tsdbRemoveTableFromIndex(STsdbMeta *pMeta, STable *pTable) {
SSkipListNode
*
pNode
=
taosArrayGetP
(
res
,
i
);
SSkipListNode
*
pNode
=
taosArrayGetP
(
res
,
i
);
// STableIndexElem* pElem = (STableIndexElem*) SL_GET_NODE_DATA(pNode);
// STableIndexElem* pElem = (STableIndexElem*) SL_GET_NODE_DATA(pNode);
if
(
*
(
STable
*
*
)
SL_GET_NODE_DATA
(
pNode
)
==
pTable
)
{
// this is the exact what we need
if
(
(
STable
*
)
SL_GET_NODE_DATA
(
pNode
)
==
pTable
)
{
// this is the exact what we need
tSkipListRemoveNode
(
pSTable
->
pIndex
,
pNode
);
tSkipListRemoveNode
(
pSTable
->
pIndex
,
pNode
);
}
}
}
}
...
@@ -1229,7 +1229,7 @@ static int tsdbRemoveTableFromStore(STsdbRepo *pRepo, STable *pTable) {
...
@@ -1229,7 +1229,7 @@ static int tsdbRemoveTableFromStore(STsdbRepo *pRepo, STable *pTable) {
}
}
while
(
tSkipListIterNext
(
pIter
))
{
while
(
tSkipListIterNext
(
pIter
))
{
STable
*
tTable
=
*
(
STable
*
*
)
SL_GET_NODE_DATA
(
tSkipListIterGet
(
pIter
));
STable
*
tTable
=
(
STable
*
)
SL_GET_NODE_DATA
(
tSkipListIterGet
(
pIter
));
ASSERT
(
TABLE_TYPE
(
tTable
)
==
TSDB_CHILD_TABLE
);
ASSERT
(
TABLE_TYPE
(
tTable
)
==
TSDB_CHILD_TABLE
);
pBuf
=
tsdbInsertTableAct
(
pRepo
,
TSDB_DROP_META
,
pBuf
,
tTable
);
pBuf
=
tsdbInsertTableAct
(
pRepo
,
TSDB_DROP_META
,
pBuf
,
tTable
);
}
}
...
@@ -1254,7 +1254,7 @@ static int tsdbRmTableFromMeta(STsdbRepo *pRepo, STable *pTable) {
...
@@ -1254,7 +1254,7 @@ static int tsdbRmTableFromMeta(STsdbRepo *pRepo, STable *pTable) {
tsdbWLockRepoMeta
(
pRepo
);
tsdbWLockRepoMeta
(
pRepo
);
while
(
tSkipListIterNext
(
pIter
))
{
while
(
tSkipListIterNext
(
pIter
))
{
STable
*
tTable
=
*
(
STable
*
*
)
SL_GET_NODE_DATA
(
tSkipListIterGet
(
pIter
));
STable
*
tTable
=
(
STable
*
)
SL_GET_NODE_DATA
(
tSkipListIterGet
(
pIter
));
tsdbRemoveTableFromMeta
(
pRepo
,
tTable
,
false
,
false
);
tsdbRemoveTableFromMeta
(
pRepo
,
tTable
,
false
,
false
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录