diff options
author | yoav-steinberg <yoav@monfort.co.il> | 2021-10-03 09:38:05 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-03 09:38:05 +0300 |
commit | 6f4f31f167fbaf6da1939a7764606059ca7e6de1 (patch) | |
tree | d93c7a571b8dac7f9bd9a9c47ac274f2b0b2718a /tests/unit/type | |
parent | 93e85347136a483047e92a3a7554f428d6260b0c (diff) | |
download | redis-6f4f31f167fbaf6da1939a7764606059ca7e6de1.tar.gz |
decrby LLONG_MIN caused nagation overflow. (#9577)
Note that this breaks compatibility because in the past doing:
DECRBY x -9223372036854775808
would succeed (and create an invalid result) and now this returns an error.
Diffstat (limited to 'tests/unit/type')
-rw-r--r-- | tests/unit/type/incr.tcl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/unit/type/incr.tcl b/tests/unit/type/incr.tcl index aa37061d5..b6aaa1112 100644 --- a/tests/unit/type/incr.tcl +++ b/tests/unit/type/incr.tcl @@ -42,6 +42,12 @@ start_server {tags {"incr"}} { format $err } {ERR*} + test {DECRBY negation overflow} { + r set x 0 + catch {r decrby x -9223372036854775808} err + format $err + } {ERR*} + test {INCR fails against a key holding a list} { r rpush mylist 1 catch {r incr mylist} err |