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

Yugo Nagata nagata at sraoss.co.jp
Mon Mar 24 18:57:31 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
------
master

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

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



More information about the pgpool-committers mailing list