Remove unnecessary function arguments.
authorToshihiro Kitagawa <kitagawa at sraoss.co.jp>
Fri, 12 Aug 2011 04:23:21 +0000 (04:23 +0000)
committerToshihiro Kitagawa <kitagawa at sraoss.co.jp>
Fri, 12 Aug 2011 04:23:21 +0000 (04:23 +0000)
pool_process_query.c
pool_proto_modules.c
pool_proto_modules.h
pool_query_context.c
pool_query_context.h

index c376e7bd79f8fcaa484bbf2a5f0b896f9d38115c..e20e0cc1feefcf01323db0d0b93bddaebb41129f 100644 (file)
@@ -801,7 +801,7 @@ POOL_STATUS send_simplequery_message(POOL_CONNECTION *backend, int len, char *st
  * seccond, and if the connection broke, returns error since there's
  * no point in that waiting until backend returns response.
  */
-POOL_STATUS wait_for_query_response(POOL_CONNECTION *frontend, POOL_CONNECTION *backend, char *string, int protoVersion)
+POOL_STATUS wait_for_query_response(POOL_CONNECTION *frontend, POOL_CONNECTION *backend, int protoVersion)
 {
 #define DUMMY_PARAMETER "pgpool_dummy_param"
 #define DUMMY_VALUE "pgpool_dummy_value"
@@ -1779,7 +1779,7 @@ POOL_STATUS do_command(POOL_CONNECTION *frontend, POOL_CONNECTION *backend,
         * Wait for response from badckend while polling frontend connection is ok.
         * If not, cancel the transaction.
         */
-       if (wait_for_query_response(frontend, backend, query, protoMajor) != POOL_CONTINUE)
+       if (wait_for_query_response(frontend, backend, protoMajor) != POOL_CONTINUE)
        {
                /* Cancel current transaction */
                CancelPacket cancel_packet;
index 2cf763b46852b3102ff9dfad20d96430963bac6d..d5eaf49789bb9fdf3e2cd539b84e4d63d5db0e06 100644 (file)
@@ -1353,7 +1353,7 @@ POOL_STATUS ReadyForQuery(POOL_CONNECTION *frontend,
                                 * transaction since 2PC commands close transaction on
                                 * primary.
                                 */
-                               else if (is_2pc_transaction_query(node, query))
+                               else if (is_2pc_transaction_query(node))
                                {
                                        if (close_standby_transactions(frontend, backend) != POOL_CONTINUE)
                                                return POOL_END;
index cabd60df6bce9866f9ca19c7d0e27590199b27e7..0945fb1c1252a4048f9928be57917ea0ddcf8016 100644 (file)
@@ -149,7 +149,7 @@ extern int RowDescription(POOL_CONNECTION *frontend,
                                                  short *result);
 
 
-extern POOL_STATUS wait_for_query_response(POOL_CONNECTION *frontend, POOL_CONNECTION *backend, char *string, int protoVersion);
+extern POOL_STATUS wait_for_query_response(POOL_CONNECTION *frontend, POOL_CONNECTION *backend, int protoVersion);
 extern int is_select_query(Node *node, char *sql);
 extern bool is_sequence_query(Node *node);
 extern bool is_start_transaction_query(Node *node);
index 8acb71d24a6a1ba1a5e5b055238699cfc286d244..bbee2a52e3ff002fafb2410f4208d4bbb4965600 100644 (file)
@@ -625,7 +625,7 @@ POOL_STATUS pool_send_and_wait(POOL_QUERY_CONTEXT *query_context, char *string,
                        continue;
                }
 
-               if (wait_for_query_response(frontend, CONNECTION(backend, i), string, MAJOR(backend)) != POOL_CONTINUE)
+               if (wait_for_query_response(frontend, CONNECTION(backend, i), MAJOR(backend)) != POOL_CONTINUE)
                {
                        /* Cancel current transaction */
                        CancelPacket cancel_packet;
@@ -856,7 +856,7 @@ static POOL_DEST send_to_where(Node *node, char *query)
                        /*
                         * 2PC commands
                         */
-                       else if (is_2pc_transaction_query(node, query))
+                       else if (is_2pc_transaction_query(node))
                                return POOL_PRIMARY;
                        else
                                /* COMMIT etc. */
@@ -1115,7 +1115,7 @@ bool is_set_transaction_serializable(Node *node, char *query)
 /*
  * Return true if the query is 2PC transaction query.
  */
-bool is_2pc_transaction_query(Node *node, char *query)
+bool is_2pc_transaction_query(Node *node)
 {
        if (((TransactionStmt *)node)->kind == TRANS_STMT_PREPARE ||
                ((TransactionStmt *)node)->kind == TRANS_STMT_COMMIT_PREPARED ||
index a08514996abf40f3c781bd00b76612796c34f3cd..de897f5802aea73a436f47b51c0a2ee570d98812 100644 (file)
@@ -70,7 +70,7 @@ POOL_STATUS pool_send_and_wait(POOL_QUERY_CONTEXT *query_context, char *query, i
 extern Node *pool_get_parse_tree(void);
 extern char *pool_get_query_string(void);
 extern bool is_set_transaction_serializable(Node *node, char *query);
-extern bool is_2pc_transaction_query(Node *node, char *query);
+extern bool is_2pc_transaction_query(Node *node);
 extern void pool_set_query_state(POOL_QUERY_CONTEXT *query_context, POOL_QUERY_STATE state);
 extern int statecmp(POOL_QUERY_STATE s1, POOL_QUERY_STATE s2);