db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@apache.org>
Subject Re: [jira] Commented: (DERBY-796) jdbc 4.0 specific Blob and Clob method support
Date Wed, 15 Feb 2006 13:56:30 GMT
V.Narayanan wrote:

> Since derby supports Blobs < 2G right now this causes no problems because
> 1) when pos <=0 it throws an error
> 2) when pos > MAX_INT it rolls around to a negative value and again
> throws an exception

Number 2) is not true. Embedded had that issue as well and was just
fixed. Long values larger than Integer.MAX_VALUE can be positive or
negative when cast to an int. The cast simply truncates the top 32 bits,
leaving the sign bit for the int as the 32th bit of the long which can
be in any state.


View raw message