diff --git a/src/redis_cmd.cc b/src/redis_cmd.cc index 8797e4ea3bc..341fd07c3c3 100644 --- a/src/redis_cmd.cc +++ b/src/redis_cmd.cc @@ -3657,7 +3657,7 @@ class CommandCommand : public Commander { public: Status Execute(Server *svr, Connection *conn, std::string *output) override { if (args_.size() == 1) { - svr->GetCommandsInfo(output); + svr->GetAllCommandsInfo(output); } else { std::string sub_command = Util::ToLower(args_[1]); if ((sub_command == "count" && args_.size() != 2) || diff --git a/src/server.cc b/src/server.cc index a8834143a38..3239c0a5157 100644 --- a/src/server.cc +++ b/src/server.cc @@ -1176,7 +1176,7 @@ std::string Server::GetCommandInfo(const Redis::CommandAttributes* command_attri return command; } -void Server::GetCommandsInfo(std::string *info) { +void Server::GetAllCommandsInfo(std::string *info) { info->append(Redis::MultiLen(commands_.size())); for (const auto &iter : commands_) { auto command_attribute = iter.second; diff --git a/src/server.h b/src/server.h index 298db3dee2f..829e3b5d636 100644 --- a/src/server.h +++ b/src/server.h @@ -53,7 +53,7 @@ class Server { void populateCommands(); bool IsCommandExists(const std::string &name); Status LookupAndCreateCommand(const std::string &cmd_name, std::unique_ptr *cmd); - void GetCommandsInfo(std::string *info); + void GetAllCommandsInfo(std::string *info); void GetCommandsInfo(std::string *info, const std::vector &cmd_names); std::string GetCommandInfo(const Redis::CommandAttributes* command_attributes); Status GetKeysFromCommand(const std::string &name, int argc, std::vector *keys_indexes);