]> git.saurik.com Git - redis.git/blobdiff - redis-cli.c
version is now 1.1.92
[redis.git] / redis-cli.c
index a1156b1070a06acd2f673b3325af10f06d439772..32e77e4c1198f502148a2453a2f05082c79c403c 100644 (file)
@@ -42,7 +42,7 @@
 
 #define REDIS_CMD_INLINE 1
 #define REDIS_CMD_BULK 2
-#define REDIS_CMD_MULTIBULK 3
+#define REDIS_CMD_MULTIBULK 4
 
 #define REDIS_NOTUSED(V) ((void) V)
 
@@ -93,11 +93,11 @@ static struct redisCommand cmdTable[] = {
     {"sdiffstore",-3,REDIS_CMD_INLINE},
     {"smembers",2,REDIS_CMD_INLINE},
     {"zadd",4,REDIS_CMD_BULK},
-    {"zincrscoreby",4,REDIS_CMD_BULK},
+    {"zincrby",4,REDIS_CMD_BULK},
     {"zrem",3,REDIS_CMD_BULK},
     {"zremrangebyscore",4,REDIS_CMD_INLINE},
     {"zrange",4,REDIS_CMD_INLINE},
-    {"zrangebyscore",4,REDIS_CMD_INLINE},
+    {"zrangebyscore",-4,REDIS_CMD_INLINE},
     {"zrevrange",4,REDIS_CMD_INLINE},
     {"zcard",2,REDIS_CMD_INLINE},
     {"zscore",3,REDIS_CMD_BULK},
@@ -115,6 +115,8 @@ static struct redisCommand cmdTable[] = {
     {"echo",2,REDIS_CMD_BULK},
     {"save",1,REDIS_CMD_INLINE},
     {"bgsave",1,REDIS_CMD_INLINE},
+    {"rewriteaof",1,REDIS_CMD_INLINE},
+    {"bgrewriteaof",1,REDIS_CMD_INLINE},
     {"shutdown",1,REDIS_CMD_INLINE},
     {"lastsave",1,REDIS_CMD_INLINE},
     {"type",2,REDIS_CMD_INLINE},
@@ -309,7 +311,8 @@ static int cliSendCommand(int argc, char **argv) {
         if (rc->flags & REDIS_CMD_MULTIBULK) {
             cmd = sdscatprintf(cmd,"*%d\r\n",argc);
             for (j = 0; j < argc; j++) {
-                cmd = sdscatprintf(cmd,"$%d\r\n",sdslen(argv[j]));
+                cmd = sdscatprintf(cmd,"$%lu\r\n",
+                    (unsigned long)sdslen(argv[j]));
                 cmd = sdscatlen(cmd,argv[j],sdslen(argv[j]));
                 cmd = sdscatlen(cmd,"\r\n",2);
             }
@@ -317,7 +320,8 @@ static int cliSendCommand(int argc, char **argv) {
             for (j = 0; j < argc; j++) {
                 if (j != 0) cmd = sdscat(cmd," ");
                 if (j == argc-1 && rc->flags & REDIS_CMD_BULK) {
-                    cmd = sdscatprintf(cmd,"%d",sdslen(argv[j]));
+                    cmd = sdscatprintf(cmd,"%lu",
+                        (unsigned long)sdslen(argv[j]));
                 } else {
                     cmd = sdscatlen(cmd,argv[j],sdslen(argv[j]));
                 }