[pgpool-committers: 1716] pgpool: Fix JDBC exception of prepared statement including now() in rep

Yugo Nagata nagata at sraoss.co.jp
Mon Mar 24 18:57:32 JST 2014


Fix JDBC exception of prepared statement including now() in replication mode

With JDBC, when a prepared statement is executed more than PreparedThreshold times,
the statement is named and Describe message is sent after Parse. With named statement,
pgpool rewrite now() to parameter at Parse in replication mode. Hence, rewritten query
has additonal parameter than original. However, ParameterDescription message sent to
frontend, which is response of Describe, should include OIDs of the same number os
original query's parameters. Otherwize, JDBC raises ArrayIndexoutOfBoundsException.

Branch
------
V3_3_STABLE

Details
-------
http://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=2b7a816ea8c4b0e8b22a09ca80c18ecd04f11946

Modified Files
--------------
pool_process_query.c |    2 +
pool_proto_modules.c |  107 ++++++++++++++++++++++++++++++++++++++++++++++++++
pool_proto_modules.h |    3 ++
pool_query_context.c |    1 +
pool_query_context.h |    1 +
pool_timestamp.c     |   13 +++---
6 files changed, 122 insertions(+), 5 deletions(-)



More information about the pgpool-committers mailing list