Fix bad merge in SCAN KEYS command
Former-commit-id: c21af6b351328ffbdb1d1e2a7eed44f8f929f8b2
This commit is contained in:
parent
c178b67ded
commit
1c8c4a5db2
@ -820,8 +820,8 @@ void scanGenericCommand(client *c, robj_roptr o, unsigned long cursor) {
|
|||||||
/* Filter an element if it isn't the type we want. */
|
/* Filter an element if it isn't the type we want. */
|
||||||
if (!filter && o == nullptr && type){
|
if (!filter && o == nullptr && type){
|
||||||
robj_roptr typecheck = lookupKeyReadWithFlags(c->db, kobj, LOOKUP_NOTOUCH);
|
robj_roptr typecheck = lookupKeyReadWithFlags(c->db, kobj, LOOKUP_NOTOUCH);
|
||||||
const char* type = getObjectTypeName(typecheck);
|
const char* typeT = getObjectTypeName(typecheck);
|
||||||
if (strcasecmp((char*) type, type)) filter = 1;
|
if (strcasecmp((char*) type, typeT)) filter = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Filter element if it is an expired key. */
|
/* Filter element if it is an expired key. */
|
||||||
|
@ -69,7 +69,7 @@ start_server {tags {"scan"}} {
|
|||||||
if {$cur == 0} break
|
if {$cur == 0} break
|
||||||
}
|
}
|
||||||
|
|
||||||
assert_equal 0 [llength $keys]
|
assert_equal 0 [llength $keys] "non-strings excluded"
|
||||||
|
|
||||||
# Check strings are included
|
# Check strings are included
|
||||||
set cur 0
|
set cur 0
|
||||||
@ -82,7 +82,7 @@ start_server {tags {"scan"}} {
|
|||||||
if {$cur == 0} break
|
if {$cur == 0} break
|
||||||
}
|
}
|
||||||
|
|
||||||
assert_equal 1000 [llength $keys]
|
assert_equal 1000 [llength $keys] "strings included"
|
||||||
|
|
||||||
# Check all three args work together
|
# Check all three args work together
|
||||||
set cur 0
|
set cur 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user