From 92cc84c82b7a7f8b826845068ba4a179ca1e61d5 Mon Sep 17 00:00:00 2001 From: Yoshiyuki Asaba Date: Wed, 1 Aug 2007 03:54:56 +0000 Subject: [PATCH] Fix SEGV when connection_cache is true and replication_mode is false. --- pool_process_query.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pool_process_query.c b/pool_process_query.c index a951173..025ea2d 100644 --- a/pool_process_query.c +++ b/pool_process_query.c @@ -616,7 +616,8 @@ static POOL_STATUS Query(POOL_CONNECTION *frontend, { pending_function = add_prepared_list; pending_prepared_stmt = stmt; - force_replication = 1; + if (REPLICATION) + force_replication = 1; prepare_in_session = 1; } } @@ -654,7 +655,8 @@ static POOL_STATUS Query(POOL_CONNECTION *frontend, return POOL_END; } free(buf); - force_replication = 1; + if (REPLICATION) + force_replication = 1; } if (frontend && @@ -684,7 +686,7 @@ static POOL_STATUS Query(POOL_CONNECTION *frontend, } /* reset query have to be replicated */ - if (frontend == NULL && prepare_in_session) + if (frontend == NULL && prepare_in_session && REPLICATION) force_replication = 1; /* load balance trick */ -- 2.39.5