Uploaded image for project: 'Percona Server'
  1. Percona Server
  2. PS-5318

after xa prepare, client exit, re-connect, data had lost.

    Details

    • Type: Bug
    • Status: On Hold
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: 5.7.20-19, 5.7.24-26
    • Fix Version/s: None
    • Component/s: MyRocks
    • Labels:

      Description

      mysql> show create table t1;
      --------------------------------------------------------------------------------------------------------------+

      Table Create Table

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

      t1 CREATE TABLE `t1` (
      `a` int(11) NOT NULL,
      PRIMARY KEY (`a`)
      ) ENGINE=ROCKSDB DEFAULT CHARSET=latin1

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

      mysql> xa start 'xatest2';
      Query OK, 0 rows affected (0.00 sec)

      mysql> insert into t1 values (2);
      Query OK, 1 row affected (0.00 sec)

      mysql> xa end '
      '> xatest2';
      ERROR 1397 (XAE04): XAER_NOTA: Unknown XID
      mysql> xa end 'xatest2';
      Query OK, 0 rows affected (0.00 sec)

      mysql> xa prepare 'xatest2';
      Query OK, 0 rows affected (0.01 sec)

      mysql> exit
      Bye
      tom@wgrocksdb:~/database/pdb/bin$ ./mysql -uroot -pTw123456 -S/tmp/perconamaster.sock
      mysql: [Warning] Using a password on the command line interface can be insecure.
      Welcome to the MySQL monitor. Commands end with ; or \g.
      Your MySQL connection id is 6
      Server version: 5.7.20-19 Source distribution

      Copyright (c) 2009-2017 Percona LLC and/or its affiliates
      Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.

      Oracle is a registered trademark of Oracle Corporation and/or its
      affiliates. Other names may be trademarks of their respective
      owners.

      Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

      mysql> xa recover;
      -----------------------------------------+

      formatID gtrid_length bqual_length data

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

      1 7 0 xatest2

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

      mysql> xa commit 'xatest2';
      Query OK, 0 rows affected (0.00 sec)

      mysql> use sbtest;
      Reading table information for completion of table and column names
      You can turn off this feature to get a quicker startup with -A

      Database changed
      mysql> select * from t1;
      Empty set (0.00 sec)

        Smart Checklist

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                tomwang tom wang
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 30 minutes
                  30m