[Jdbc-commits] pgjdbc: Protocol sync is lost when a batch statement parameter has an
User Jurka
jurka at pgfoundry.org
Thu Feb 4 00:48:54 UTC 2010
Log Message:
-----------
Protocol sync is lost when a batch statement parameter has an
embedded null byte. When the server responds with an error message,
the batch error handler tries to construct the equivalent original
query text with the parameters substituted in. This conversion
fails on the driver side with an IllegalArgumentException complaining
about the null byte. There isn't a catch block in place to handle
that exception, so it returns all the way to the user without
processing the remainder of the protocol stream. Later queries
get confused because they see the leftover messages from the
failed batch execution instead of their own results.
Avoid throwing the IllegalArgumentException and instead don't bother
being strictly accurate with the query text escaping as it's just
informational.
Tags:
----
REL8_4_STABLE
Modified Files:
--------------
pgjdbc/org/postgresql/core/v3:
SimpleParameterList.java (r1.17 -> r1.17.2.1)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/jdbc/pgjdbc/org/postgresql/core/v3/SimpleParameterList.java?r1=1.17&r2=1.17.2.1)
pgjdbc/org/postgresql/test/jdbc2:
BatchExecuteTest.java (r1.16 -> r1.16.4.1)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/jdbc/pgjdbc/org/postgresql/test/jdbc2/BatchExecuteTest.java?r1=1.16&r2=1.16.4.1)
More information about the Jdbc-commits
mailing list