Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-21856

XID_t::formatID has to be contrained to 4 byte size

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 10.1, 10.2, 10.3, 10.4, 10.5
    • Fix Version/s: 10.5.2
    • Component/s: Replication, Server
    • Labels:
      None

      Description

      There are two causes requiring that.
      1. Engine understanding of the member has been of 4 bytes, at least in Innodb case:

       CREATE TABLE `ti` (
        `a` int(11) DEFAULT NULL
      ) ENGINE=InnoDB;
      xa start '1','2',4611686018427387905;
        insert into ti set a=1;
      xa end '1','2',4611686018427387905;
      xa prepare '1','2',4611686018427387905;
      xa recover;
      +---------------------+--------------+--------------+------+
      | formatID            | gtrid_length | bqual_length | data |
      +---------------------+--------------+--------------+------+
      | 4611686018427387905 |            1 |            1 | 12   |
      +---------------------+--------------+--------------+------+
      --error crash
      xa commit '1','2',4611686018427387905;
       
      # restart mysqld
      xa recover;
      ERROR 2006 (HY000): MySQL server has gone away
      No connection. Trying to reconnect...
      Connection id:    4
      Current database: test
       
      +----------+--------------+--------------+------+
      | formatID | gtrid_length | bqual_length | data |
      +----------+--------------+--------------+------+
      |        1 |            1 |            1 | 12   |
      +----------+--------------+--------------+------+
      
      

      2. and the 2nd reason is XA replication across different platforms which
      mean different sizes for ulong specified entity. Constraining it to 4 satisfies them all.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Elkin Andrei Elkin
              Reporter:
              Elkin Andrei Elkin
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: