From: | Barry Lind <blind(at)xythos(dot)com> |
---|---|
To: | Rich Cullingford <rculling(at)sysd(dot)com> |
Cc: | pgsql-jdbc <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: More on updates with first() vs absolute() |
Date: | 2003-03-07 20:21:48 |
Message-ID: | 3E68FF5C.4010101@xythos.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Rich,
Thanks for debugging. The fix is obvious enough from your description
that a patch is unnecessary. I will check the fix into CVS later today.
thanks,
--Barry
Rich Cullingford wrote:
> Good morning,
> Yesterday I reported a crash in updateRow() when preceded by an
> absolute(1) positioning call, when preceding it with first() worked. It
> now seems the DB update was happening OK; the crash was a null pointer
> exception at the line:
>
> rowBuffer[columnIndex] =
> connection.getEncoding().encode(String.valueOf(valueObject));
>
> of updateRowBuffer(). It appears the rowBuffer isn't being initialized
> properly, and, sure enough, when you compare first() with absolute(),
> the former has:
>
> rowBuffer = new byte[this_row.length][];
> System.arraycopy(this_row, 0, rowBuffer, 0, this_row.length);
>
> while the latter does not. Adding the initialization cures the crash.
> There might be other locations needing the same patch.
>
> If this is an acceptable patch, I'll be happy to submit it if someone
> tells me how. (It looks like a cvs diff to pgsql-jdbc is the desired
> way, but I'm not clear how to do that: do I start with the current
> pg-snapshot or something else?)
>
> Rich Cullingford
> System Detection, Inc.
> 5 W 19th St, NYC, NY 10010
> rculling(at)sysd(dot)com
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>
From | Date | Subject | |
---|---|---|---|
Next Message | Barry Lind | 2003-03-07 20:29:37 | Re: Fw: Can't update rows in tables qualified with schema |
Previous Message | Barry Lind | 2003-03-07 20:09:08 | Re: getGeneratedKeys() |