diff options
| author | Pavan Deolasee | 2016-02-17 12:37:21 +0000 |
|---|---|---|
| committer | Pavan Deolasee | 2016-10-18 09:58:31 +0000 |
| commit | e3a034e84f12a8103984205634ccc936d7d8240a (patch) | |
| tree | 45dbe44d205ccf3926f31bbc9ab9ec207c8aca2e /src/backend/pgxc | |
| parent | 653aae1ca78f90f114110e7c1442fa4b10e2034b (diff) | |
Fix a few compiler warnings.
Diffstat (limited to 'src/backend/pgxc')
| -rw-r--r-- | src/backend/pgxc/pool/execRemote.c | 39 | ||||
| -rw-r--r-- | src/backend/pgxc/pool/pgxcnode.c | 2 | ||||
| -rw-r--r-- | src/backend/pgxc/squeue/squeue.c | 1 |
3 files changed, 21 insertions, 21 deletions
diff --git a/src/backend/pgxc/pool/execRemote.c b/src/backend/pgxc/pool/execRemote.c index 9657ab0157..033182defb 100644 --- a/src/backend/pgxc/pool/execRemote.c +++ b/src/backend/pgxc/pool/execRemote.c @@ -1184,7 +1184,7 @@ FetchTuple(ResponseCombiner *combiner) for (;;) { Datum value = (Datum) 0; - bool isnull; + bool isnull = false; int numnodes; int i; @@ -4139,6 +4139,25 @@ FinishRemotePreparedTransaction(char *prepareGID, bool commit) bool prepared_local = false; /* + * Get the list of nodes involved in this transaction. + * + * This function returns the GXID of the prepared transaction. It also + * returns a fresh GXID which can be used for running COMMIT PREPARED + * commands on the remote nodes. Both these GXIDs can then be either + * committed or aborted together. + * + * XXX While I understand that we get the prepared and a new GXID with a + * single call, it doesn't look nicer and create confusion. We should + * probably split them into two parts. This is used only for explicit 2PC + * which should not be very common in XC + */ + if (GetGIDDataGTM(prepareGID, &gxid, &prepare_gxid, &nodestring) < 0) + ereport(ERROR, + (errcode(ERRCODE_INTERNAL_ERROR), + errmsg("prepared transaction with identifier \"%s\" does not exist", + prepareGID))); + + /* * Please note that with xc_maintenance_mode = on, COMMIT/ROLLBACK PREPARED will not * propagate to remote nodes. Only GTM status is cleaned up. */ @@ -4158,24 +4177,6 @@ FinishRemotePreparedTransaction(char *prepareGID, bool commit) return false; } - /* - * Get the list of nodes involved in this transaction. - * - * This function returns the GXID of the prepared transaction. It also - * returns a fresh GXID which can be used for running COMMIT PREPARED - * commands on the remote nodes. Both these GXIDs can then be either - * committed or aborted together. - * - * XXX While I understand that we get the prepared and a new GXID with a - * single call, it doesn't look nicer and create confusion. We should - * probably split them into two parts. This is used only for explicit 2PC - * which should not be very common in XC - */ - if (GetGIDDataGTM(prepareGID, &gxid, &prepare_gxid, &nodestring) < 0) - ereport(ERROR, - (errcode(ERRCODE_INTERNAL_ERROR), - errmsg("prepared transaction with identifier \"%s\" does not exist", - prepareGID))); prepared_local = pgxc_node_remote_finish(prepareGID, commit, nodestring, gxid, prepare_gxid); diff --git a/src/backend/pgxc/pool/pgxcnode.c b/src/backend/pgxc/pool/pgxcnode.c index b103403280..f367486720 100644 --- a/src/backend/pgxc/pool/pgxcnode.c +++ b/src/backend/pgxc/pool/pgxcnode.c @@ -525,7 +525,7 @@ retry: if (poll_val == 0) { /* Handle timeout */ - elog(DEBUG1, "timeout %d while waiting for any response from %d connections", timeout_ms,conn_count); + elog(DEBUG1, "timeout %ld while waiting for any response from %d connections", timeout_ms,conn_count); for (i = 0; i < conn_count; i++) connections[i]->state = DN_CONNECTION_STATE_ERROR_FATAL; return NO_ERROR_OCCURED; diff --git a/src/backend/pgxc/squeue/squeue.c b/src/backend/pgxc/squeue/squeue.c index 5ede9d5373..6b96208fa9 100644 --- a/src/backend/pgxc/squeue/squeue.c +++ b/src/backend/pgxc/squeue/squeue.c @@ -1469,7 +1469,6 @@ SharedQueueRelease(const char *sqname) { volatile SQueueSync *sqsync = sq->sq_sync; int i; - char ntype = PGXC_NODE_DATANODE; Assert(sqsync && sqsync->queue == sq); |
