redis-cli: check SELECT reply type just in state updated.
In issues #3361 / #3365 a problem was reported / fixed with redis-cli not updating correctly the current DB on error after SELECT. In theory this bug was fixed in 99d1ee8e, but actually the commit only fixed the prompt updating, not the fact the state was set in a wrong way. This commit removes the check in the prompt update, now that hopefully it is the state that is correct, there is no longer need for this check.
This commit is contained in:
parent
f0fd80e326
commit
aee72b7aa4
@ -161,7 +161,7 @@ static void cliRefreshPrompt(void) {
|
||||
len = anetFormatAddr(config.prompt, sizeof(config.prompt),
|
||||
config.hostip, config.hostport);
|
||||
/* Add [dbnum] if needed */
|
||||
if (config.dbnum != 0 && config.last_cmd_type != REDIS_REPLY_ERROR)
|
||||
if (config.dbnum != 0)
|
||||
len += snprintf(config.prompt+len,sizeof(config.prompt)-len,"[%d]",
|
||||
config.dbnum);
|
||||
snprintf(config.prompt+len,sizeof(config.prompt)-len,"> ");
|
||||
|
Loading…
x
Reference in New Issue
Block a user