if {$encoding == "ziplist"} {
r config set zset-max-ziplist-entries 128
r config set zset-max-ziplist-value 64
- } elseif {$encoding == "raw"} {
+ } elseif {$encoding == "skiplist"} {
r config set zset-max-ziplist-entries 0
r config set zset-max-ziplist-value 0
} else {
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
}
basics ziplist
- basics raw
+ basics skiplist
+
+ test {ZINTERSTORE regression with two sets, intset+hashtable} {
+ r del seta setb setc
+ r sadd set1 a
+ r sadd set2 10
+ r zinterstore set3 2 set1 set2
+ } {0}
proc stressers {encoding} {
if {$encoding == "ziplist"} {
r config set zset-max-ziplist-entries 256
r config set zset-max-ziplist-value 64
set elements 128
- } elseif {$encoding == "raw"} {
+ } elseif {$encoding == "skiplist"} {
r config set zset-max-ziplist-entries 0
r config set zset-max-ziplist-value 0
set elements 1000
tags {"slow"} {
stressers ziplist
- stressers raw
+ stressers skiplist
}
}