Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
5881bdb6
T
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1193
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看板
提交
5881bdb6
编写于
2月 08, 2023
作者:
dengyihao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add test case
上级
b8ada783
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
53 addition
and
1 deletion
+53
-1
source/dnode/vnode/src/meta/metaQuery.c
source/dnode/vnode/src/meta/metaQuery.c
+8
-0
tests/script/tsim/tagindex/add_index.sim
tests/script/tsim/tagindex/add_index.sim
+45
-1
未找到文件。
source/dnode/vnode/src/meta/metaQuery.c
浏览文件 @
5881bdb6
...
@@ -1260,6 +1260,14 @@ int32_t metaFilterTableIds(SMeta *pMeta, SMetaFltParam *param, SArray *pUids) {
...
@@ -1260,6 +1260,14 @@ int32_t metaFilterTableIds(SMeta *pMeta, SMetaFltParam *param, SArray *pUids) {
if
(
tdbTbcMoveTo
(
pCursor
->
pCur
,
pKey
,
nKey
,
&
cmp
)
<
0
)
{
if
(
tdbTbcMoveTo
(
pCursor
->
pCur
,
pKey
,
nKey
,
&
cmp
)
<
0
)
{
goto
END
;
goto
END
;
}
}
if
(
cmp
<
0
)
{
}
else
if
(
cmp
>
0
)
{
if
(
param
->
reverse
)
{
tdbTbcMoveToPrev
(
pCursor
->
pCur
);
}
else
{
tdbTbcMoveToNext
(
pCursor
->
pCur
);
}
}
int
count
=
0
;
int
count
=
0
;
int32_t
valid
=
0
;
int32_t
valid
=
0
;
...
...
tests/script/tsim/tagindex/add_index.sim
浏览文件 @
5881bdb6
...
@@ -7,7 +7,7 @@ print ======== step0
...
@@ -7,7 +7,7 @@ print ======== step0
$dbPrefix = ta_3_db
$dbPrefix = ta_3_db
$tbPrefix = ta_3_tb
$tbPrefix = ta_3_tb
$mtPrefix = ta_3_mt
$mtPrefix = ta_3_mt
$tbNum =
101
$tbNum =
6
$rowNum = 20
$rowNum = 20
$totalNum = 200
$totalNum = 200
...
@@ -60,6 +60,7 @@ while $i < $tbNum
...
@@ -60,6 +60,7 @@ while $i < $tbNum
$i = $i + 1
$i = $i + 1
endw
endw
# great equal than
$i = 0
$i = 0
while $i < $tbNum
while $i < $tbNum
sql select * from $mtPrefix where t2 >= $i ;
sql select * from $mtPrefix where t2 >= $i ;
...
@@ -70,4 +71,47 @@ while $i < $tbNum
...
@@ -70,4 +71,47 @@ while $i < $tbNum
$i = $i + 1
$i = $i + 1
endw
endw
# great than
$i = 0
while $i < $tbNum
sql select * from $mtPrefix where t2 > $i ;
$tmp = $tbNum - $i
$tmp = $tmp - 1
if $rows != $tmp then
print $rows
print $i
print $tmp
return -1
endi
$i = $i + 1
endw
# lower equal than
$i = 0
while $i < $tbNum
sql select * from $mtPrefix where t2 <= $i ;
$tmp = $i + 1
if $rows != $tmp then
return -1
endi
$i = $i + 1
endw
# lower equal than
$i = 0
while $i < $tbNum
sql select * from $mtPrefix where t2 < $i ;
$tmp = $i
if $rows != $tmp then
return -1
endi
$i = $i + 1
endw
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录