Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
03fd01c7
Commit
03fd01c7
authored
May 22, 2009
by
antirez
Browse files
S*STORE now return the cardinality of the resulting set
parent
e3d48807
Changes
2
Hide whitespace changes
Inline
Side-by-side
client-libraries/ruby_2/rubyredis.rb
View file @
03fd01c7
...
@@ -236,7 +236,7 @@ class RedisClient
...
@@ -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 by
t
e"
end
end
end
end
end
end
redis.c
View file @
03fd01c7
...
@@ -3052,7 +3052,8 @@ static void sinterGenericCommand(redisClient *c, robj **setskeys, int setsnum, r
...
@@ -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
...
@@ -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);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment