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
d89db584
Commit
d89db584
authored
May 20, 2011
by
antirez
Browse files
Merge branch '2.4' of github.com:antirez/redis into 2.4
parents
1f2af715
10e4b583
Changes
2
Show whitespace changes
Inline
Side-by-side
src/t_zset.c
View file @
d89db584
...
...
@@ -1556,7 +1556,7 @@ void zunionInterGenericCommand(redisClient *c, robj *dstkey, int op) {
}
} else if (op == REDIS_OP_UNION) {
for (i = 0; i < setnum; i++) {
if
(
zuiLength
(
&
src
[
0
])
==
0
)
if (zuiLength(&src[
i
]) == 0)
continue;
while (zuiNext(&src[i],&zval)) {
...
...
tests/unit/type/zset.tcl
View file @
d89db584
...
...
@@ -353,6 +353,14 @@ start_server {tags {"zset"}} {
assert_equal 0
[
r exists dst_key
]
}
test
"ZUNIONSTORE with empty set -
$encoding
"
{
r del zseta zsetb
r zadd zseta 1 a
r zadd zseta 2 b
r zunionstore zsetc 2 zseta zsetb
r zrange zsetc 0 -1 withscores
}
{
a 1 b 2
}
test
"ZUNIONSTORE basics -
$encoding
"
{
r del zseta zsetb zsetc
r zadd zseta 1 a
...
...
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