Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
2.4.0
-
None
Description
Quoted from KB:
The xid can have 3 components, though only the first one is mandatory. gtrid is a quoted string representing a global transaction identifier. bqual is a quoted string representing a local transaction identifier. formatID is an unsigned integer indicating the format used for the first two components bq.
In XA spec:
If OSI CCR naming is used, then
the XID’s formatID element should be set to 0; if some other format is used, then the
formatID element should be greater than 0.
JDBC XID format ID is an Integer. (Java Integer is signed 32bit numeric).
native Xid format is :
struct xid_t { |
long formatID; /∗ format identifier ∗/ |
long gtrid_length; /∗ value 1-64 ∗/ |
long bqual_length; /∗ value 1-64 ∗/ |
char data[XIDDATASIZE]; |
};
|
websphere for example create formatID according to this format (https://github.com/OpenLiberty/open-liberty/blob/464735a8588770d8ce055a4505f53c9a029b12ab/dev/com.ibm.tx.core/src/com/ibm/tx/jta/impl/XidImpl.java#L155)
So Xid formatId value has better to be sent in hexa. Integer conversion to byte won't then have any signed / unsigned consideration.
Attachments
Activity
Field | Original Value | New Value |
---|---|---|
Description |
Quoted from [KB|https://mariadb.com/kb/en/library/xa-transactions/#syntax]: bq. The xid can have 3 components, though only the first one is mandatory. gtrid is a quoted string representing a global transaction identifier. bqual is a quoted string representing a local transaction identifier. formatID is an unsigned integer indicating the format used for the first two components bq. In [XA spec|http://pubs.opengroup.org/onlinepubs/009680699/toc.pdf]: {quote}If OSI CCR naming is used, then the XID’s formatID element should be set to 0; if some other format is used, then the formatID element should be greater than 0. {quote} JDBC [XID |https://docs.oracle.com/javase/10/docs/api/javax/transaction/xa/Xid.html] format ID is an Integer. (Java Integer is signed 32bit numeric). native Xid format is : {code:c} struct xid_t { long formatID; /∗ format identifier ∗/ long gtrid_length; /∗ value 1-64 ∗/ long bqual_length; /∗ value 1-64 ∗/ char data[XIDDATASIZE]; }; {code} websphere for example create formatID according to this format (https://github.com/OpenLiberty/open-liberty/blob/464735a8588770d8ce055a4505f53c9a029b12ab/dev/com.ibm.tx.core/src/com/ibm/tx/jta/impl/XidImpl.java#L155) So in int here mustn't be considered as standard java signed 32bit numeric, but unsigned 32 bit numeric. The connector exchanges of Xid need to send formatId to unsigned 4 byte numeric. |
Quoted from [KB|https://mariadb.com/kb/en/library/xa-transactions/#syntax]:
bq. The xid can have 3 components, though only the first one is mandatory. gtrid is a quoted string representing a global transaction identifier. bqual is a quoted string representing a local transaction identifier. formatID is an unsigned integer indicating the format used for the first two components bq. In [XA spec|http://pubs.opengroup.org/onlinepubs/009680699/toc.pdf]: {quote}If OSI CCR naming is used, then the XID’s formatID element should be set to 0; if some other format is used, then the formatID element should be greater than 0. {quote} JDBC [XID |https://docs.oracle.com/javase/10/docs/api/javax/transaction/xa/Xid.html] format ID is an Integer. (Java Integer is signed 32bit numeric). native Xid format is : {code:c} struct xid_t { long formatID; /∗ format identifier ∗/ long gtrid_length; /∗ value 1-64 ∗/ long bqual_length; /∗ value 1-64 ∗/ char data[XIDDATASIZE]; }; {code} websphere for example create formatID according to this format (https://github.com/OpenLiberty/open-liberty/blob/464735a8588770d8ce055a4505f53c9a029b12ab/dev/com.ibm.tx.core/src/com/ibm/tx/jta/impl/XidImpl.java#L155) So Xid formatId integer mustn't be considered as standard java signed 32bit numeric, but unsigned 32 bit numeric. The connector exchanges of Xid need to send formatId to unsigned 4 byte numeric. |
Affects Version/s | 2.4.0 [ 23154 ] |
Description |
Quoted from [KB|https://mariadb.com/kb/en/library/xa-transactions/#syntax]:
bq. The xid can have 3 components, though only the first one is mandatory. gtrid is a quoted string representing a global transaction identifier. bqual is a quoted string representing a local transaction identifier. formatID is an unsigned integer indicating the format used for the first two components bq. In [XA spec|http://pubs.opengroup.org/onlinepubs/009680699/toc.pdf]: {quote}If OSI CCR naming is used, then the XID’s formatID element should be set to 0; if some other format is used, then the formatID element should be greater than 0. {quote} JDBC [XID |https://docs.oracle.com/javase/10/docs/api/javax/transaction/xa/Xid.html] format ID is an Integer. (Java Integer is signed 32bit numeric). native Xid format is : {code:c} struct xid_t { long formatID; /∗ format identifier ∗/ long gtrid_length; /∗ value 1-64 ∗/ long bqual_length; /∗ value 1-64 ∗/ char data[XIDDATASIZE]; }; {code} websphere for example create formatID according to this format (https://github.com/OpenLiberty/open-liberty/blob/464735a8588770d8ce055a4505f53c9a029b12ab/dev/com.ibm.tx.core/src/com/ibm/tx/jta/impl/XidImpl.java#L155) So Xid formatId integer mustn't be considered as standard java signed 32bit numeric, but unsigned 32 bit numeric. The connector exchanges of Xid need to send formatId to unsigned 4 byte numeric. |
Quoted from [KB|https://mariadb.com/kb/en/library/xa-transactions/#syntax]:
bq. The xid can have 3 components, though only the first one is mandatory. gtrid is a quoted string representing a global transaction identifier. bqual is a quoted string representing a local transaction identifier. formatID is an unsigned integer indicating the format used for the first two components bq. In [XA spec|http://pubs.opengroup.org/onlinepubs/009680699/toc.pdf]: {quote}If OSI CCR naming is used, then the XID’s formatID element should be set to 0; if some other format is used, then the formatID element should be greater than 0. {quote} JDBC [XID |https://docs.oracle.com/javase/10/docs/api/javax/transaction/xa/Xid.html] format ID is an Integer. (Java Integer is signed 32bit numeric). native Xid format is : {code:c} struct xid_t { long formatID; /∗ format identifier ∗/ long gtrid_length; /∗ value 1-64 ∗/ long bqual_length; /∗ value 1-64 ∗/ char data[XIDDATASIZE]; }; {code} websphere for example create formatID according to this format (https://github.com/OpenLiberty/open-liberty/blob/464735a8588770d8ce055a4505f53c9a029b12ab/dev/com.ibm.tx.core/src/com/ibm/tx/jta/impl/XidImpl.java#L155) So Xid formatId value has better to be send in hexa. This would avoid iinteger mustn't be considered as standard java signed 32bit numeric, but unsigned 32 bit numeric. The connector exchanges of Xid need to send formatId to unsigned 4 byte numeric. |
Description |
Quoted from [KB|https://mariadb.com/kb/en/library/xa-transactions/#syntax]:
bq. The xid can have 3 components, though only the first one is mandatory. gtrid is a quoted string representing a global transaction identifier. bqual is a quoted string representing a local transaction identifier. formatID is an unsigned integer indicating the format used for the first two components bq. In [XA spec|http://pubs.opengroup.org/onlinepubs/009680699/toc.pdf]: {quote}If OSI CCR naming is used, then the XID’s formatID element should be set to 0; if some other format is used, then the formatID element should be greater than 0. {quote} JDBC [XID |https://docs.oracle.com/javase/10/docs/api/javax/transaction/xa/Xid.html] format ID is an Integer. (Java Integer is signed 32bit numeric). native Xid format is : {code:c} struct xid_t { long formatID; /∗ format identifier ∗/ long gtrid_length; /∗ value 1-64 ∗/ long bqual_length; /∗ value 1-64 ∗/ char data[XIDDATASIZE]; }; {code} websphere for example create formatID according to this format (https://github.com/OpenLiberty/open-liberty/blob/464735a8588770d8ce055a4505f53c9a029b12ab/dev/com.ibm.tx.core/src/com/ibm/tx/jta/impl/XidImpl.java#L155) So Xid formatId value has better to be send in hexa. This would avoid iinteger mustn't be considered as standard java signed 32bit numeric, but unsigned 32 bit numeric. The connector exchanges of Xid need to send formatId to unsigned 4 byte numeric. |
Quoted from [KB|https://mariadb.com/kb/en/library/xa-transactions/#syntax]:
bq. The xid can have 3 components, though only the first one is mandatory. gtrid is a quoted string representing a global transaction identifier. bqual is a quoted string representing a local transaction identifier. formatID is an unsigned integer indicating the format used for the first two components bq. In [XA spec|http://pubs.opengroup.org/onlinepubs/009680699/toc.pdf]: {quote}If OSI CCR naming is used, then the XID’s formatID element should be set to 0; if some other format is used, then the formatID element should be greater than 0. {quote} JDBC [XID |https://docs.oracle.com/javase/10/docs/api/javax/transaction/xa/Xid.html] format ID is an Integer. (Java Integer is signed 32bit numeric). native Xid format is : {code:c} struct xid_t { long formatID; /∗ format identifier ∗/ long gtrid_length; /∗ value 1-64 ∗/ long bqual_length; /∗ value 1-64 ∗/ char data[XIDDATASIZE]; }; {code} websphere for example create formatID according to this format (https://github.com/OpenLiberty/open-liberty/blob/464735a8588770d8ce055a4505f53c9a029b12ab/dev/com.ibm.tx.core/src/com/ibm/tx/jta/impl/XidImpl.java#L155) So Xid formatId value has better to be sent in hexa. Integer conversion to byte won't then have any signed / unsigned consideration. |
Fix Version/s | 2.4.2 [ 23707 ] |
issue.field.resolutiondate | 2019-06-12 16:36:00.0 | 2019-06-12 16:36:00.941 |
Component/s | XA [ 15116 ] | |
Resolution | Fixed [ 1 ] | |
Status | Open [ 1 ] | Closed [ 6 ] |
Workflow | MariaDB v3 [ 97403 ] | MariaDB v4 [ 135116 ] |