for (j = 2; j < c->argc; j++) {
if (setTypeRemove(set,c->argv[j])) {
- if (setTypeSize(set) == 0) dbDelete(c->db,c->argv[1]);
deleted++;
+ if (setTypeSize(set) == 0) {
+ dbDelete(c->db,c->argv[1]);
+ break;
+ }
}
}
if (deleted) {
lsort [r smembers myset]
} {a c}
+ test {SREM variadic version with more args needed to destroy the key} {
+ r del myset
+ r sadd myset 1 2 3
+ r srem myset 1 2 3 4 5 6 7 8
+ } {3}
+
foreach {type} {hashtable intset} {
for {set i 1} {$i <= 5} {incr i} {
r del [format "set%d" $i]