mirror of
https://github.com/fluencelabs/redis
synced 2025-06-20 20:46:31 +00:00
Reject MOVE to non-integer DBs
Previously, "MOVE key somestring" would move the key to DB 0 which is just unexpected and wrong. String as DB == error. Test added too. Modified by @antirez in order to use the getLongLongFromObject() API instead of strtol(). Fixes #1428
This commit is contained in:
@ -404,6 +404,12 @@ start_server {tags {"basic"}} {
|
||||
r move mykey 10
|
||||
} {0}
|
||||
|
||||
test {MOVE against non-integer DB (#1428)} {
|
||||
r set mykey hello
|
||||
catch {r move mykey notanumber} e
|
||||
set e
|
||||
} {*ERR*index out of range}
|
||||
|
||||
test {SET/GET keys in different DBs} {
|
||||
r set a hello
|
||||
r set b world
|
||||
|
Reference in New Issue
Block a user