Unverified Commit 67732bac authored by uriyage's avatar uriyage Committed by GitHub
Browse files

redis-cli: reset dbnum and tx prompt state after RESET (#9096)

parent a418a2d3
...@@ -1488,7 +1488,14 @@ static int cliSendCommand(int argc, char **argv, long repeat) { ...@@ -1488,7 +1488,14 @@ static int cliSendCommand(int argc, char **argv, long repeat) {
config.in_multi = 0; config.in_multi = 0;
config.input_dbnum = config.dbnum = config.pre_multi_dbnum; config.input_dbnum = config.dbnum = config.pre_multi_dbnum;
cliRefreshPrompt(); cliRefreshPrompt();
} } else if (!strcasecmp(command,"reset") && argc == 1 &&
config.last_cmd_type != REDIS_REPLY_ERROR) {
config.in_multi = 0;
config.dbnum = 0;
config.input_dbnum = 0;
config.resp3 = 0;
cliRefreshPrompt();
}
} }
if (config.cluster_reissue_command){ if (config.cluster_reissue_command){
/* If we need to reissue the command, break to prevent a /* If we need to reissue the command, break to prevent a
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment