Best unofficial Apache Server developers community
Username
Forgot password?
Sign in with Twitter account
Sign in with Facebook account
List archives

HINCRBY overflows?

PUSH with timer for min release time
(18 lines)
Feb 4, 2012
Zzz
Zzz
set n -9223372036854775484
+OK
incrby n -100000
-ERR increment or decrement would overflow
incrby n -1000
-ERR increment or decrement would overflow
hput f n -9223372036854775484
-ERR unknown command 'hput'
hset f n -9223372036854775484
:1
hget f n
$20
-9223372036854775484
hincrby f n -10000
:9223372036854766132
hincrby f n 10000
:-9223372036854775484


So is this by design? or a bug?

How do i get the same/similar behavior as INCRBY -- basically if it's
going to overflow, either returning error or returning MAX_LONG.

thanks.





Reply
Tags: decrementincrementoverflow
Messages in this thread
HINCRBY overflows?
reply Re: HINCRBY overflows?
(44 lines) Feb 5, 2012 04:14
hincrby with decimals
July 7, 2011 10:50:12 PM
I'm using the 2.2.111-scripting tag, and I can't do HINCRBY with a decimal. For example: redis 127.0.0.1:6379> hget account:h50 usd "100" redis 127.0.0.1:6379> HINCRBY account:h50 usd 22.01 (error) ERR value is not an integer or out of…
suggestion: HINCR/HINCRBY
October 27, 2010 04:33:36 AM
HINCR/HINCRBY purpose: atomic increment of a hash field synposis: HINCR key field HINCRBY key field delta Best Regards, Shannon
Re: Issue 232 in redis: hincrby is clearing out other hash elements
August 30, 2010 06:18:49 AM
Updates: Status: Verified Comment #8 on issue 232 by antirez: hincrby is clearing out other hash elements http://code.google.com/p/redis/issues/detail?id=232 This was definitely fixed in Redis master (first stable release to have this fix…
Created] (HIVE-2159) TableSample(percent ) uses one intermediate size to be int, which overflows for
May 11, 2011 02:51:33 PM
TableSample(percent ) uses one intermediate size to be int, which overflows for large sampled size, making the sampling never triggered.
DO NOT REPLY Apache htdbm utility buffer overflows/format strings
September 17, 2011 10:46:41 AM
https://issues.apache.org/bugzilla/show_bug.cgi?id=30586 Stefan Fritsch <s### @sfritsch.de> changed: What |Removed |Added
Created] (DERBY-5533) Client differs from embedded when rs.updateInt overflows: 22015 vs 22003
December 12, 2011 01:06:06 PM
Client differs from embedded when rs.updateInt overflows: 22015 vs 22003
Updated: (FOR-1104) pdf output warnings "paragraph overflows the available area"
January 11, 2011 09:26:32 PM
[ https://issues.apache.org/jira/browse/FOR-1104?page=com.atlassian.jira .plugin.system.issuetabpanels:all-tabpanel ] David Crossley updated FOR-1104: