pgpool2.git / summary / log / commit / refs

commit    6a1a7b7679f484c5753dedffb0a4fc24a4b1d711
Author:   Tatsuo Ishii <ishii at sraoss.co.jp>
Date:     Sat Mar 14 03:39:50 2009 +0000

    Fix need_insert_lock so that it returns false if the protocol version
    is 2. insert_lock has not been working for V2 protocol anyway, so this
    is ok.


pool_process_query.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pool_process_query.c b/pool_process_query.c index 281216296..3258cf45e 100644 --- a/pool_process_query.c +++ b/pool_process_query.c @@ -3056,6 +3056,15 @@ int need_insert_lock(POOL_CONNECTION_POOL *backend, char *query, Node *node) int use_serial = 0; char *dbname; + /* + * for version 2 protocol, we cannot check if it's actually uses + * SERIAL data types or not since the underlying infrastructure + * (do_query) does not support the protocol. So we just return + * false. + */ + if (MAJOR(backend) == PROTO_MAJOR_V2) + return 0; + /* INSERT statement? */ if (!IsA(node, InsertStmt)) return 0; [parent: 93053443307b]