From: Toshihiro Kitagawa Date: Fri, 12 Aug 2011 04:23:21 +0000 (+0000) Subject: Remove unnecessary function arguments. X-Git-Tag: V3_1_0_BETA1~6 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=0f99cff342692c820e9b1787c39928878c3906fb;p=pgpool2.git Remove unnecessary function arguments. --- diff --git a/pool_process_query.c b/pool_process_query.c index c376e7bd7..e20e0cc1f 100644 --- a/pool_process_query.c +++ b/pool_process_query.c @@ -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; diff --git a/pool_proto_modules.c b/pool_proto_modules.c index 2cf763b46..d5eaf4978 100644 --- a/pool_proto_modules.c +++ b/pool_proto_modules.c @@ -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; diff --git a/pool_proto_modules.h b/pool_proto_modules.h index cabd60df6..0945fb1c1 100644 --- a/pool_proto_modules.h +++ b/pool_proto_modules.h @@ -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); diff --git a/pool_query_context.c b/pool_query_context.c index 8acb71d24..bbee2a52e 100644 --- a/pool_query_context.c +++ b/pool_query_context.c @@ -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 || diff --git a/pool_query_context.h b/pool_query_context.h index a08514996..de897f580 100644 --- a/pool_query_context.h +++ b/pool_query_context.h @@ -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);