提交 3b46cf97 编写于 作者: A antirez

redis-cli --bigkeys: show error when TYPE fails.

Close #3993.
上级 f59b4b93
...@@ -2022,8 +2022,13 @@ static void getKeyTypes(redisReply *keys, int *types) { ...@@ -2022,8 +2022,13 @@ static void getKeyTypes(redisReply *keys, int *types) {
keys->element[i]->str, context->err, context->errstr); keys->element[i]->str, context->err, context->errstr);
exit(1); exit(1);
} else if(reply->type != REDIS_REPLY_STATUS) { } else if(reply->type != REDIS_REPLY_STATUS) {
fprintf(stderr, "Invalid reply type (%d) for TYPE on key '%s'!\n", if(reply->type == REDIS_REPLY_ERROR) {
reply->type, keys->element[i]->str); fprintf(stderr, "TYPE returned an error: %s\n", reply->str);
} else {
fprintf(stderr,
"Invalid reply type (%d) for TYPE on key '%s'!\n",
reply->type, keys->element[i]->str);
}
exit(1); exit(1);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册