Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix DECRBY LLONG_MIN caused an overflow (#1581)
Note that this may break compatibility since in the past doing: `DECRBY key -9223372036854775808` would succeed but create an invalid result. And now we will return an error rejecting the request. Before: ``` 127.0.0.1:6666> set key 0 OK 127.0.0.1:6666> decrby key -9223372036854775807 (integer) 9223372036854775807 127.0.0.1:6666> get key "9223372036854775807" 127.0.0.1:6666> set key 0 OK 127.0.0.1:6666> decrby key -9223372036854775808 (integer) -9223372036854775808 127.0.0.1:6666> get key "-9223372036854775808" ``` After: ``` 127.0.0.1:6666> decrby key -9223372036854775808 (error) ERR decrement would overflow ```
- Loading branch information