pgpool2.git / summary / log / commit / refs

commit    2e4cfb8749421ffa10371275d688a803a40056fe
Author:   Yoshiyuki Asaba <y-asaba at pgfoundry.org>
Date:     Wed Aug 29 06:01:17 2007 +0000

    Read response messages in Parse() until receiving ParseComplete or
    ErrorResponse message.


pool_process_query.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/pool_process_query.c b/pool_process_query.c index 591bac4da..bfe6b5483 100644 --- a/pool_process_query.c +++ b/pool_process_query.c @@ -1423,6 +1423,7 @@ static POOL_STATUS send_execute_message(POOL_CONNECTION_POOL *backend, static POOL_STATUS Parse(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend) { + char kind; int len; char *string; int i; @@ -1554,6 +1555,22 @@ static POOL_STATUS Parse(POOL_CONNECTION *frontend, } } } + + for (;;) + { + kind = pool_read_kind(backend); + if (kind < 0) + { + pool_error("Parse: pool_read_kind error"); + return POOL_ERROR; + } + SimpleForwardToFrontend(kind, frontend, backend); + if (pool_flush(frontend) < 0) + return POOL_ERROR; + + if (kind != 'N') + break; + } return POOL_CONTINUE; } [parent: 1c4394a3c98f]