From f48946db06b6f740392890a88999b4d5955a587c Mon Sep 17 00:00:00 2001 From: antirez Date: Wed, 8 Nov 2017 22:59:15 +0100 Subject: Streams: fix redis-cli to understand the stream type. --- src/redis-cli.c | 7 +++++-- 1 file 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; -- cgit v1.2.1