diff options
Diffstat (limited to 'src/db.c')
-rw-r--r-- | src/db.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -915,14 +915,16 @@ void scanGenericCommand(client *c, robj *o, unsigned long cursor) { } while (cursor && maxiterations-- && listLength(keys) < (unsigned long)count); - } else if (o->type == OBJ_SET) { + } else if (o->type == OBJ_SET && o->encoding == OBJ_ENCODING_INTSET) { int pos = 0; int64_t ll; while(intsetGet(o->ptr,pos++,&ll)) listAddNodeTail(keys,createStringObjectFromLongLong(ll)); cursor = 0; - } else if (o->type == OBJ_HASH || o->type == OBJ_ZSET) { + } else if ((o->type == OBJ_HASH || o->type == OBJ_ZSET || o->type == OBJ_SET) && + o->encoding == OBJ_ENCODING_LISTPACK) + { unsigned char *p = lpFirst(o->ptr); unsigned char *vstr; int64_t vlen; |