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