Commit 03fd01c7 authored by antirez's avatar antirez
Browse files

S*STORE now return the cardinality of the resulting set

parent e3d48807
......@@ -236,7 +236,7 @@ class RedisClient
}
res
else
raise "Protocol error, got '#{rtype}' as initial reply bye"
raise "Protocol error, got '#{rtype}' as initial reply byte"
end
end
end
......@@ -3052,7 +3052,8 @@ static void sinterGenericCommand(redisClient *c, robj **setskeys, int setsnum, r
if (!dstkey) {
lenobj->ptr = sdscatprintf(sdsempty(),"*%d\r\n",cardinality);
} else {
addReply(c,shared.ok);
addReplySds(c,sdscatprintf(sdsempty(),":%d\r\n",
dictSize((dict*)dstset->ptr)));
server.dirty++;
}
zfree(dv);
......@@ -3157,7 +3158,8 @@ static void sunionDiffGenericCommand(redisClient *c, robj **setskeys, int setsnu
if (!dstkey) {
decrRefCount(dstset);
} else {
addReply(c,shared.ok);
addReplySds(c,sdscatprintf(sdsempty(),":%d\r\n",
dictSize((dict*)dstset->ptr)));
server.dirty++;
}
zfree(dv);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment