pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: dmp <danap@ttc-cmc.net>
To: Peter Cooner <petriborg@gmail.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: Possible bug / regression from generated keys
Date: Thu, 08 Nov 2012 08:57:08 -0700
Message-ID: <509BD654.5030500@ttc-cmc.net> (raw)
In-Reply-To: <CAHVZnpGjooaNCm9N9q10m+2ZxoeVnMKXhOv60tGLvOFdUUaWkw@mail.gmail.com>
References: <CAHVZnpFRa2qp8s_=42MV8s6p1=3W6A-K0bv+XgO=JtfmTHrAzA@mail.gmail.com>
	<509A8FDC.6040403@ttc-cmc.net>
	<CAHVZnpHpGH3S_TDtfVYiQmmEqz3=ixbyRWTpTpdRC-EtmXBoVg@mail.gmail.com>
	<509A989D.5020108@ttc-cmc.net>
	<CADK3HHK60GdVAo-DDe8bbEhHJt==4_ZUbnvvWG-XLxY5EBZyXQ@mail.gmail.com>
	<CAHVZnpGQL2P_cQSdUqDOT9PohHPSE11ZbvSm9czj0isAagQpZw@mail.gmail.com>
	<CADK3HHKB9Z3+9R3dXen+cgJgDV7tXVdOotQo38i3bQ-oZ+1L8w@mail.gmail.com>
	<CAHVZnpHuZVQqebHcbyPAuLvTegd-ycpu043hLxDX0UfFBFje4A@mail.gmail.com>
	<CADK3HHKOfy3ODmOsy4bqL9mpcaicttCn6e8uNgrAmQS7jwYuAQ@mail.gmail.com>
	<509B0539.1050601@ttc-cmc.net>
	<CAHVZnpERodJFbT1AWJBFXcOsBCDtDp1DxsHg1pwd02eHkSiobw@mail.gmail.com>
	<CAHVZnpGjooaNCm9N9q10m+2ZxoeVnMKXhOv60tGLvOFdUUaWkw@mail.gmail.com>

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




view thread (19+ messages)  latest in thread

Message-ID: <509BD654.5030500@ttc-cmc.net>
Permalink:  ../509BD654.5030500@ttc-cmc.net/
Also on:    postgresql.org/message-id/509BD654.5030500@ttc-cmc.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: danap@ttc-cmc.net, petriborg@gmail.com
  Subject: Re: Possible bug / regression from generated keys
  In-Reply-To: <509BD654.5030500@ttc-cmc.net>
  References: <CAHVZnpFRa2qp8s_=42MV8s6p1=3W6A-K0bv+XgO=JtfmTHrAzA@mail.gmail.com> <509A8FDC.6040403@ttc-cmc.net> <CAHVZnpHpGH3S_TDtfVYiQmmEqz3=ixbyRWTpTpdRC-EtmXBoVg@mail.gmail.com> <509A989D.5020108@ttc-cmc.net> <CADK3HHK60GdVAo-DDe8bbEhHJt==4_ZUbnvvWG-XLxY5EBZyXQ@mail.gmail.com> <CAHVZnpGQL2P_cQSdUqDOT9PohHPSE11ZbvSm9czj0isAagQpZw@mail.gmail.com> <CADK3HHKB9Z3+9R3dXen+cgJgDV7tXVdOotQo38i3bQ-oZ+1L8w@mail.gmail.com> <CAHVZnpHuZVQqebHcbyPAuLvTegd-ycpu043hLxDX0UfFBFje4A@mail.gmail.com> <CADK3HHKOfy3ODmOsy4bqL9mpcaicttCn6e8uNgrAmQS7jwYuAQ@mail.gmail.com> <509B0539.1050601@ttc-cmc.net> <CAHVZnpERodJFbT1AWJBFXcOsBCDtDp1DxsHg1pwd02eHkSiobw@mail.gmail.com> <CAHVZnpGjooaNCm9N9q10m+2ZxoeVnMKXhOv60tGLvOFdUUaWkw@mail.gmail.com> <509BD654.5030500@ttc-cmc.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox