Correctly check for implicit 2PC.
authorPavan Deolasee <[email protected]>
Mon, 15 Feb 2016 09:52:53 +0000 (15:22 +0530)
committerPavan Deolasee <[email protected]>
Mon, 15 Feb 2016 18:30:08 +0000 (00:00 +0530)
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)

contrib/pgxc_clean/txninfo.c

index dae047e7457d3b1a52f6bce6b2f21a7a6bfd40a4..804b2da18eeccce26107bf338779788aa4e1d912 100644 (file)
@@ -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;
 }