Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SELECT command argument #566

Closed
pirj opened this issue Jun 26, 2012 · 0 comments
Closed

SELECT command argument #566

pirj opened this issue Jun 26, 2012 · 0 comments

Comments

@pirj
Copy link

pirj commented Jun 26, 2012

Incorrect argument resets current DB to default. Reply is 'OK'.
Expected: DB is not changed. Reply is same as for numeric argument.
The argument is not so obvious as from the DOCS unless you read all the disqus comments.

$ redis-cli 
redis 127.0.0.1:6379> SELECT "1"
OK
redis 127.0.0.1:6379[1]> SELECT "16"
(error) ERR invalid DB index
redis 127.0.0.1:6379[16]> SELECT "BLAH-ab84-bfg456"
OK
redis 127.0.0.1:6379>
mattsta added a commit to mattsta/redis that referenced this issue Aug 1, 2014
Previously redis-cli would happily show "-1" or "99999"
as valid DB choices.

Now, if the SELECT call returned an error, we don't update
the DB number in the CLI.

Inspired by @anupshendkar in redis#1313

Fixes redis#566, redis#1313
mattsta added a commit to mattsta/redis that referenced this issue Aug 2, 2014
Previously redis-cli would happily show "-1" or "99999"
as valid DB choices.

Now, if the SELECT call returned an error, we don't update
the DB number in the CLI.

Inspired by @anupshendkar in redis#1313

Fixes redis#566, redis#1313
mattsta added a commit to mattsta/redis that referenced this issue Aug 6, 2014
Previously redis-cli would happily show "-1" or "99999"
as valid DB choices.

Now, if the SELECT call returned an error, we don't update
the DB number in the CLI.

Inspired by @anupshendkar in redis#1313

Fixes redis#566, redis#1313
mattsta added a commit that referenced this issue Aug 26, 2014
Previously redis-cli would happily show "-1" or "99999"
as valid DB choices.

Now, if the SELECT call returned an error, we don't update
the DB number in the CLI.

Inspired by @anupshendkar in #1313

Fixes #566, #1313
mattsta added a commit that referenced this issue Aug 27, 2014
Previously redis-cli would happily show "-1" or "99999"
as valid DB choices.

Now, if the SELECT call returned an error, we don't update
the DB number in the CLI.

Inspired by @anupshendkar in #1313

Fixes #566, #1313
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant