Remove unnessary global variables.
authorTatsuo Ishii <ishii at sraoss.co.jp>
Fri, 11 Jun 2010 03:46:16 +0000 (03:46 +0000)
committerTatsuo Ishii <ishii at sraoss.co.jp>
Fri, 11 Jun 2010 03:46:16 +0000 (03:46 +0000)
pool_process_query.c
pool_proto_modules.c
pool_query_context.h

index bc996859143928994b006e85be7b868bbae62a06..40a513544780b83f59909715525b881c8731069f 100644 (file)
@@ -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");
 }
 
index 09f221bdaa8ac20037ed7d5aadbd9346fa962082..e1eff8bfd79c699806344998cf1b6d8359c4aaef 100644 (file)
@@ -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);
index 324c8dcfc7697129b2d524efbc5c163078c69c8a..18d7d8a2eb6a2305ad334e2b6d190cabb8df0fe4 100644 (file)
@@ -33,8 +33,6 @@
 /*
  * Query context:
  * Manages per query context
- * ³ÈÄ¥Ì䤤¹ç¤ï¤»¤Ç¤ÏÊ£¿ô¤Î¥¯¥¨¥ê¥³¥ó¥Æ¥­¥¹¥È¤¬Æ±»þ¤ËÁö¤ë¤«¤âÃΤì¤Ê¤¤¡£
- * ÆâÉô¤ÇȯÀ¸¤¹¤ëÌ䤤¹ç¤ï¤»¤â¤¢¤ë¤·¡£
  */
 typedef struct {
        char *original_query;           /* original query string */