* 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"
* 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;
* 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;
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);
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;
/*
* 2PC commands
*/
- else if (is_2pc_transaction_query(node, query))
+ else if (is_2pc_transaction_query(node))
return POOL_PRIMARY;
else
/* COMMIT etc. */
/*
* 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 ||
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);