From 8b55a027a48ca1d03a86aed31a8d95abd6e16918 Mon Sep 17 00:00:00 2001 From: Tatsuo Ishii Date: Fri, 11 Jun 2010 03:46:16 +0000 Subject: [PATCH] Remove unnessary global variables. --- pool_process_query.c | 7 ++++++- pool_proto_modules.c | 6 ++++++ pool_query_context.h | 2 -- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/pool_process_query.c b/pool_process_query.c index bc9968591..40a513544 100644 --- a/pool_process_query.c +++ b/pool_process_query.c @@ -1901,6 +1901,7 @@ void reset_variables(void) { pool_unset_query_in_progress(); +#ifdef REMOVED /* End load balance mode */ if (in_load_balance) end_load_balance(); @@ -1917,6 +1918,7 @@ void reset_variables(void) replication_was_enabled = 0; } } +#endif internal_transaction_started = 0; mismatch_ntuples = 0; @@ -2183,6 +2185,7 @@ void start_load_balance(POOL_CONNECTION_POOL *backend) } #endif +#ifdef REMOVED /* temporarily turn off replication mode */ if (REPLICATION) replication_was_enabled = 1; @@ -2191,6 +2194,7 @@ void start_load_balance(POOL_CONNECTION_POOL *backend) REPLICATION = 0; MASTER_SLAVE = 0; +#endif #ifdef NOTUSED backend->slots[0] = slots[selected_slot]; @@ -2207,6 +2211,7 @@ void start_load_balance(POOL_CONNECTION_POOL *backend) */ void end_load_balance(void) { +#ifdef REMOVED in_load_balance = 0; LOAD_BALANCE_STATUS(selected_slot) = LOAD_UNSELECTED; @@ -2216,7 +2221,7 @@ void end_load_balance(void) replication_was_enabled = 0; master_slave_was_enabled = 0; - +#endif pool_debug("end_load_balance: end load balance mode"); } diff --git a/pool_proto_modules.c b/pool_proto_modules.c index 09f221bda..e1eff8bfd 100644 --- a/pool_proto_modules.c +++ b/pool_proto_modules.c @@ -579,6 +579,7 @@ POOL_STATUS Execute(POOL_CONNECTION *frontend, receive_extended_begin = 1; } +#ifdef REMOVED if (load_balance_enabled(backend, node, string1)) start_load_balance(backend); else if (REPLICATION && @@ -594,6 +595,7 @@ POOL_STATUS Execute(POOL_CONNECTION *frontend, select_in_transaction = 1; execute_select = 1; } +#endif /* else if (REPLICATION && start_internal_transaction(backend, (Node *)p_stmt->query)) { @@ -604,6 +606,7 @@ POOL_STATUS Execute(POOL_CONNECTION *frontend, commit = is_commit_query((Node *)p_stmt->query); } +#ifdef REMOVED if (MASTER_SLAVE) { master_slave_was_enabled = 1; @@ -615,6 +618,7 @@ POOL_STATUS Execute(POOL_CONNECTION *frontend, REPLICATION = 1; } } +#endif if (REPLICATION || PARALLEL_MODE) { @@ -1270,6 +1274,7 @@ POOL_STATUS ReadyForQuery(POOL_CONNECTION *frontend, if (in_load_balance) end_load_balance(); +#ifdef REMOVED if (master_slave_dml) { MASTER_SLAVE = 1; @@ -1282,6 +1287,7 @@ POOL_STATUS ReadyForQuery(POOL_CONNECTION *frontend, replication_was_enabled = 0; } } +#endif #ifdef NOT_USED return ProcessFrontendResponse(frontend, backend); diff --git a/pool_query_context.h b/pool_query_context.h index 324c8dcfc..18d7d8a2e 100644 --- a/pool_query_context.h +++ b/pool_query_context.h @@ -33,8 +33,6 @@ /* * Query context: * Manages per query context - * ³ÈÄ¥Ì䤤¹ç¤ï¤»¤Ç¤ÏÊ£¿ô¤Î¥¯¥¨¥ê¥³¥ó¥Æ¥­¥¹¥È¤¬Æ±»þ¤ËÁö¤ë¤«¤âÃΤì¤Ê¤¤¡£ - * ÆâÉô¤ÇȯÀ¸¤¹¤ëÌ䤤¹ç¤ï¤»¤â¤¢¤ë¤·¡£ */ typedef struct { char *original_query; /* original query string */ -- 2.39.5