mirror of
https://github.com/fluencelabs/redis
synced 2025-04-02 15:51:05 +00:00
S*STORE now return the cardinality of the resulting set
This commit is contained in:
parent
e3d48807b9
commit
03fd01c7eb
@ -236,7 +236,7 @@ class RedisClient
|
|||||||
}
|
}
|
||||||
res
|
res
|
||||||
else
|
else
|
||||||
raise "Protocol error, got '#{rtype}' as initial reply bye"
|
raise "Protocol error, got '#{rtype}' as initial reply byte"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
6
redis.c
6
redis.c
@ -3052,7 +3052,8 @@ static void sinterGenericCommand(redisClient *c, robj **setskeys, int setsnum, r
|
|||||||
if (!dstkey) {
|
if (!dstkey) {
|
||||||
lenobj->ptr = sdscatprintf(sdsempty(),"*%d\r\n",cardinality);
|
lenobj->ptr = sdscatprintf(sdsempty(),"*%d\r\n",cardinality);
|
||||||
} else {
|
} else {
|
||||||
addReply(c,shared.ok);
|
addReplySds(c,sdscatprintf(sdsempty(),":%d\r\n",
|
||||||
|
dictSize((dict*)dstset->ptr)));
|
||||||
server.dirty++;
|
server.dirty++;
|
||||||
}
|
}
|
||||||
zfree(dv);
|
zfree(dv);
|
||||||
@ -3157,7 +3158,8 @@ static void sunionDiffGenericCommand(redisClient *c, robj **setskeys, int setsnu
|
|||||||
if (!dstkey) {
|
if (!dstkey) {
|
||||||
decrRefCount(dstset);
|
decrRefCount(dstset);
|
||||||
} else {
|
} else {
|
||||||
addReply(c,shared.ok);
|
addReplySds(c,sdscatprintf(sdsempty(),":%d\r\n",
|
||||||
|
dictSize((dict*)dstset->ptr)));
|
||||||
server.dirty++;
|
server.dirty++;
|
||||||
}
|
}
|
||||||
zfree(dv);
|
zfree(dv);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user