Uploaded image for project: 'TokuDB'
  1. DB-784

Prepared XA transaction gets lost on restart

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects versions: tokudb-7.5.3
    • Fix versions: None
    • Components: plugins
    • Labels:
      None
    • Sprint:

      Description

      On a crash the prepared XA transactions get recovered, but on restart they don't

      mysql [test] > CREATE TABLE t1 (id int) ENGINE=TokuDB;
      Query OK, 0 rows affected (0.01 sec)

      mysql [test] > XA RECOVER;
      Empty set (0.00 sec)

      mysql [test] > XA START 'foo-3';
      Query OK, 0 rows affected (0.00 sec)

      mysql [test] > INSERT INTO t1 VALUES(1);
      Query OK, 1 row affected (0.01 sec)

      mysql [test] > XA END 'foo-3';
      Query OK, 0 rows affected (0.00 sec)

      mysql [test] > XA PREPARE 'foo-3';
      Query OK, 0 rows affected (0.00 sec)

      mysql [test] > XA RECOVER;
      ---------------------------------------+

      formatID gtrid_length bqual_length data

      ---------------------------------------+

      1 5 0 foo-3

      ---------------------------------------+
      1 row in set (0.00 sec)

      mysql [test] > ! ./restart

      mysql [test] > XA RECOVER;
      ERROR 2006 (HY000): MySQL server has gone away
      No connection. Trying to reconnect...
      Connection id: 1
      Current database: test

      Empty set (0.00 sec)

      mysql [test] > XA START 'foo-4';
      Query OK, 0 rows affected (0.00 sec)

      mysql [test] > INSERT INTO t1 VALUES(2);
      Query OK, 1 row affected (0.00 sec)

      mysql [test] > XA END 'foo-4';
      Query OK, 0 rows affected (0.00 sec)

      mysql [test] > XA PREPARE 'foo-4';
      Query OK, 0 rows affected (0.00 sec)

      kill -9 on mysqld and mysqld_safe...

      mysql [test] > XA RECOVER;
      ERROR 2006 (HY000): MySQL server has gone away
      No connection. Trying to reconnect...
      Connection id: 1
      Current database: test

      ---------------------------------------+

      formatID gtrid_length bqual_length data

      ---------------------------------------+

      1 5 0 foo-4

      ---------------------------------------+
      1 row in set (0.00 sec)

      mysql [test] > select version();
      ---------------------

      version()

      ---------------------

      5.5.40-tokudb-7.5.3

      ---------------------
      1 row in set (0.00 sec)

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                dveeden Daniël van Eeden
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: