]> git.saurik.com Git - redis.git/commitdiff
Merge branch 'unstable'
authorantirez <antirez@gmail.com>
Wed, 25 May 2011 10:33:25 +0000 (12:33 +0200)
committerantirez <antirez@gmail.com>
Wed, 25 May 2011 10:33:25 +0000 (12:33 +0200)
src/pubsub.c
src/t_zset.c
src/util.c
tests/integration/replication.tcl
tests/test_helper.tcl
tests/unit/printver.tcl [new file with mode: 0644]

index 2bd3d05807071aa7853d3c478a5318aec475389b..728e559c9e4c563067c5fd2ce8417fc9ec0b5061 100644 (file)
@@ -141,7 +141,7 @@ int pubsubUnsubscribePattern(redisClient *c, robj *pattern, int notify) {
 /* Unsubscribe from all the channels. Return the number of channels the
  * client was subscribed from. */
 int pubsubUnsubscribeAllChannels(redisClient *c, int notify) {
-    dictIterator *di = dictGetIterator(c->pubsub_channels);
+    dictIterator *di = dictGetSafeIterator(c->pubsub_channels);
     dictEntry *de;
     int count = 0;
 
index 19aac3d50a3792cfa0bb4d0ce3839039466bde61..a5dc27c7685e7677f0f138d9284ddc41b25a68ab 100644 (file)
@@ -1521,7 +1521,7 @@ void zunionInterGenericCommand(redisClient *c, robj *dstkey, int op) {
 
                 score = src[0].weight * zval.score;
                 for (j = 1; j < setnum; j++) {
-                    /* It is not safe to access the hash we zset we are
+                    /* It is not safe to access the zset we are
                      * iterating, so explicitly check for equal object. */
                     if (src[j].subject == src[0].subject) {
                         value = zval.score*src[j].weight;
@@ -1566,7 +1566,7 @@ void zunionInterGenericCommand(redisClient *c, robj *dstkey, int op) {
                 /* Because the inputs are sorted by size, it's only possible
                  * for sets at larger indices to hold this element. */
                 for (j = (i+1); j < setnum; j++) {
-                    /* It is not safe to access the hash we zset we are
+                    /* It is not safe to access the zset we are
                      * iterating, so explicitly check for equal object. */
                     if(src[j].subject == src[i].subject) {
                         value = zval.score*src[j].weight;
index e83dbeddc0e856b4e6a2bfeef72c17e7965b6b6e..f5a23af2aeacd50a31c906223b0355edb7379ef9 100644 (file)
@@ -1,9 +1,11 @@
+#include "fmacros.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
 #include <ctype.h>
 #include <limits.h>
 #include <math.h>
+
 #include "util.h"
 
 /* Glob-style pattern matching. */
index 7be4df4b7d32d74d0fb5e5c7260c810ac138cf7e..892fae03b662f6c585e755223912c21bdfab2037 100644 (file)
@@ -28,7 +28,7 @@ start_server {tags {"repl"}} {
             createComplexDataset r 50000 useexpire
             after 4000 ;# Make sure everything expired before taking the digest
             r keys *   ;# Force DEL syntesizing to slave
-            after 1000 ;# Wait another second. Now everything should be file.
+            after 1000 ;# Wait another second. Now everything should be fine.
             if {[r debug digest] ne [r -1 debug digest]} {
                 set csv1 [csvdump r]
                 set csv2 [csvdump {r -1}]
index c594f6f6dcce39c14be89c9a2ebfd57eb44df66e..6dc85eff37c4a137fad0c382d76af675335f0d52 100644 (file)
@@ -110,6 +110,7 @@ proc cleanup {} {
 }
 
 proc execute_everything {} {
+    execute_tests "unit/printver"
     execute_tests "unit/auth"
     execute_tests "unit/protocol"
     execute_tests "unit/basic"
diff --git a/tests/unit/printver.tcl b/tests/unit/printver.tcl
new file mode 100644 (file)
index 0000000..c80f451
--- /dev/null
@@ -0,0 +1,6 @@
+start_server {} {
+    set i [r info]
+    regexp {redis_version:(.*?)\r\n} $i - version
+    regexp {redis_git_sha1:(.*?)\r\n} $i - sha1
+    puts "Testing Redis version $version ($sha1)"
+}