From: Pavan Deolasee Date: Mon, 15 Feb 2016 09:52:53 +0000 (+0530) Subject: Correctly check for implicit 2PC. X-Git-Tag: XL9_5_R1BETA1~19 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=d18f61675ccfd3d2c33e8d88cc1aaa31be3e3332;p=postgres-xl.git Correctly check for implicit 2PC. Now we have far more information embedded in the GID string. So there is no point looking for [0-9]+ pattern beyond the prefix. Just assume external tools would never use that pattern (PREPARE TRANSACTION should anyway throw an error if they try to use the pattern) --- diff --git a/contrib/pgxc_clean/txninfo.c b/contrib/pgxc_clean/txninfo.c index dae047e745..804b2da18e 100644 --- a/contrib/pgxc_clean/txninfo.c +++ b/contrib/pgxc_clean/txninfo.c @@ -439,11 +439,6 @@ static int check_xid_is_implicit(char *xid) { if (strncmp(xid, XIDPREFIX, strlen(XIDPREFIX)) != 0) return 0; - for(xid += strlen(XIDPREFIX); *xid; xid++) - { - if (*xid < '0' || *xid > '9') - return 0; - } return 1; }