add test case

This commit is contained in:
yihaoDeng 2023-02-08 22:13:29 +08:00
parent b8ada78305
commit 5881bdb6ff
2 changed files with 53 additions and 1 deletions

View File

@ -1260,6 +1260,14 @@ int32_t metaFilterTableIds(SMeta *pMeta, SMetaFltParam *param, SArray *pUids) {
if (tdbTbcMoveTo(pCursor->pCur, pKey, nKey, &cmp) < 0) {
goto END;
}
if (cmp < 0) {
} else if (cmp > 0) {
if (param->reverse) {
tdbTbcMoveToPrev(pCursor->pCur);
} else {
tdbTbcMoveToNext(pCursor->pCur);
}
}
int count = 0;
int32_t valid = 0;

View File

@ -7,7 +7,7 @@ print ======== step0
$dbPrefix = ta_3_db
$tbPrefix = ta_3_tb
$mtPrefix = ta_3_mt
$tbNum = 101
$tbNum = 6
$rowNum = 20
$totalNum = 200
@ -60,6 +60,7 @@ while $i < $tbNum
$i = $i + 1
endw
# great equal than
$i = 0
while $i < $tbNum
sql select * from $mtPrefix where t2 >= $i ;
@ -70,4 +71,47 @@ while $i < $tbNum
$i = $i + 1
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