1
0
mirror of https://github.com/fluencelabs/redis synced 2025-07-27 22:41:56 +00:00

Merge branch '2.4' of github.com:antirez/redis into 2.4

This commit is contained in:
antirez
2011-05-20 11:44:38 +02:00
2 changed files with 9 additions and 1 deletions
src
tests/unit/type

@@ -1556,7 +1556,7 @@ void zunionInterGenericCommand(redisClient *c, robj *dstkey, int op) {
} }
} else if (op == REDIS_OP_UNION) { } else if (op == REDIS_OP_UNION) {
for (i = 0; i < setnum; i++) { for (i = 0; i < setnum; i++) {
if (zuiLength(&src[0]) == 0) if (zuiLength(&src[i]) == 0)
continue; continue;
while (zuiNext(&src[i],&zval)) { while (zuiNext(&src[i],&zval)) {

@@ -353,6 +353,14 @@ start_server {tags {"zset"}} {
assert_equal 0 [r exists dst_key] 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" { test "ZUNIONSTORE basics - $encoding" {
r del zseta zsetb zsetc r del zseta zsetb zsetc
r zadd zseta 1 a r zadd zseta 1 a