提交 5881bdb6 编写于 作者: dengyihao's avatar dengyihao

add test case

上级 b8ada783
...@@ -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;
......
...@@ -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.
先完成此消息的编辑!
想要评论请 注册