Re: Possible bug / regression from generated keys

From: dmp <danap(at)ttc-cmc(dot)net>
To: Peter Cooner <petriborg(at)gmail(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Possible bug / regression from generated keys
Date: 2012-11-08 15:57:08
Message-ID: 509BD654.5030500@ttc-cmc.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Ater some thought I'm in agreement with Dave. The backend must be sending
an unexpected value that can not be converted.

Peter can you please send a post of the core prepare commit code that is
used to create these batches along with the exact place in your code
before the PSQLExceptions codes are given. I assume from your original post
that would include the getGeneratedKeys() that you indicated is the place
the error occurs for the ResultSet?

A simple test code case to recreate the error would be of course best.

danap.

Peter Cooner wrote:
> OK, so here is the batch info:
>
> batch number, number of rows
> 1, 2
> 2, 3
> 3, 4
> 4, 4 - failed on row 4 - PSQLException: Bad value for type long :
> 5, 3 - failed on row 3 - PSQLException: Bad value for type long :
> 6, 1 - failed on row 1 - ArrayIndexOutOfBoundsException: 4
> 7, 4
> 8, 1 - failed on row 1 - ArrayIndexOutOfBoundsException: 4
> 9, 2
> 10, 3
> 11, 4
> 12, 3 - failed on row 3 - PSQLException: Bad value for type long : =
> 13, 1 - failed on row 1 - ArrayIndexOutOfBoundsException: 4
> 14, 1 - failed on row 1 - ArrayIndexOutOfBoundsException: 4
> 15, 4 - failed on row 4 - PSQLException: Bad value for type long : M
> 16, 1 - failed on row 1 - ArrayIndexOutOfBoundsException: 4
>
> Always on column 1, position_id
>
>
> Normally I would expect the batches to be larger, but I've reduced the
> data speed for testing.
>
>
>
> Dave Cramer wrote:
>> So I had a quick look at the code and the only way it gets into this
>> code is through a test which is essentially
>>
>> if ( isBinary and isINT8 )
>>
>> So unless the backend is sending an int8 as less than 8 bytes or there
>> is some other bug in the JDBC code in which it gets confused as to what
>> it is pointing to I don't see how it gets to this exception.
>>
>> Dave

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Peter Cooner 2012-11-08 18:01:58 Re: Possible bug / regression from generated keys
Previous Message Peter Cooner 2012-11-08 13:39:55 Re: Possible bug / regression from generated keys