mirror of
http://github.com/valkey-io/valkey
synced 2024-11-22 09:17:20 +00:00
Fix RESP3 response for HKEYS/HVALS on non-existing key
This commit is contained in:
parent
18b30467f7
commit
5380716a70
@ -772,7 +772,9 @@ void genericHgetallCommand(client *c, int flags) {
|
||||
hashTypeIterator *hi;
|
||||
int length, count = 0;
|
||||
|
||||
if ((o = lookupKeyReadOrReply(c,c->argv[1],shared.emptymap[c->resp]))
|
||||
robj *emptyResp = (flags & OBJ_HASH_KEY && flags & OBJ_HASH_VALUE) ?
|
||||
shared.emptymap[c->resp] : shared.emptyarray;
|
||||
if ((o = lookupKeyReadOrReply(c,c->argv[1],emptyResp))
|
||||
== NULL || checkType(c,o,OBJ_HASH)) return;
|
||||
|
||||
/* We return a map if the user requested keys and values, like in the
|
||||
|
Loading…
Reference in New Issue
Block a user