summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2017-11-08 22:59:15 +0100
committerantirez <antirez@gmail.com>2017-11-08 22:59:15 +0100
commitf48946db06b6f740392890a88999b4d5955a587c (patch)
tree95039ade2a596a36def3128c6ad87a484b189aa0
parentb95975207005e1fe2d119bb1f810323453598d63 (diff)
downloadredis-f48946db06b6f740392890a88999b4d5955a587c.tar.gz
Streams: fix redis-cli to understand the stream type.
-rw-r--r--src/redis-cli.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/redis-cli.c b/src/redis-cli.c
index ca9fe6ad7..be258f743 100644
--- a/src/redis-cli.c
+++ b/src/redis-cli.c
@@ -1980,7 +1980,8 @@ static void pipeMode(void) {
#define TYPE_SET 2
#define TYPE_HASH 3
#define TYPE_ZSET 4
-#define TYPE_NONE 5
+#define TYPE_STREAM 5
+#define TYPE_NONE 6
static redisReply *sendScan(unsigned long long *it) {
redisReply *reply = redisCommand(context, "SCAN %llu", *it);
@@ -2039,6 +2040,8 @@ static int toIntType(char *key, char *type) {
return TYPE_HASH;
} else if(!strcmp(type, "zset")) {
return TYPE_ZSET;
+ } else if(!strcmp(type, "stream")) {
+ return TYPE_STREAM;
} else if(!strcmp(type, "none")) {
return TYPE_NONE;
} else {
@@ -2127,7 +2130,7 @@ static void findBigKeys(void) {
unsigned long long biggest[5] = {0}, counts[5] = {0}, totalsize[5] = {0};
unsigned long long sampled = 0, total_keys, totlen=0, *sizes=NULL, it=0;
sds maxkeys[5] = {0};
- char *typename[] = {"string","list","set","hash","zset"};
+ char *typename[] = {"string","list","set","hash","zset","stream"};
char *typeunit[] = {"bytes","items","members","fields","members"};
redisReply *reply, *keys;
unsigned int arrsize=0, i;