mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 09:00:51 +00:00
Fix for redis_cli printing default DB when select command fails.
This commit is contained in:
parent
24bd9b19f6
commit
9dfd9d1412
@ -916,7 +916,7 @@ static int cliSendCommand(int argc, char **argv, int repeat) {
|
||||
return REDIS_ERR;
|
||||
} else {
|
||||
/* Store database number when SELECT was successfully executed. */
|
||||
if (!strcasecmp(command,"select") && argc == 2) {
|
||||
if (!strcasecmp(command,"select") && argc == 2 && config.last_cmd_type != REDIS_REPLY_ERROR) {
|
||||
config.dbnum = atoi(argv[1]);
|
||||
cliRefreshPrompt();
|
||||
} else if (!strcasecmp(command,"auth") && argc == 2) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user