Uploaded image for project: 'Percona XtraDB Cluster'
  1. Percona XtraDB Cluster
  2. PXC-879

Wrong count if LOAD DATA used with GTIDs

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.6.38-26.23, 5.7.20-29.24
    • Component/s: None
    • Labels:
      None

      Description

      If I run PXC with options gtid_mode=on  and enforce_gtid_consistency=on insert a lot of data using LOAD DATA INFILE command on one node other nodes will have less rows than the first one.

      How to repeat.

      1. Start PXC using MTR test suite:
        ./mtr -suite=galera_3nodes --mysqld=wsrep-provider=`pwd`/../lib/libgalera_smm.so --start galera_certification_ccc --mysqld=gtid-mode=on --mysqld=-enforce_gtid_consistency=on &

        # Connect to 1 node:
        ../bin/mysql -uroot -h127.0.0.1 -P13000 test
      2. Create table using file table_def.txt, attached to the ZD ticket
      3. Copy large dump file (attached to the ZD ticket) to
        var/mysqld.1/data/test/
      4. Connect to 1 node:
        ../bin/mysql -uroot -h127.0.0.1 -P13000 test
      5. Run
        load data infile 'ss.20171002.tmp' into table click_log_20170701;
        (with default options it takes about 1.5 hours. You should either increase MTR timeout or make sure you are back in 1.5 hours)
      6. Query number of rows in the table:
        mysql> select count(*) from click_log_20170701;
         +----------+
         | count(*) |
         +----------+
         |  8646385 |
         +----------+
         1 row in set (8.50 sec)
      7. Connect to second node and query number of rows in the table:
         $ ../bin/mysql -uroot -h127.0.0.1 -P13004 test
         Reading table information for completion of table and column names
         You can turn off this feature to get a quicker startup with -A
         
         Welcome to the MySQL monitor.  Commands end with ; or \g.
         Your MySQL connection id is 9
         Server version: 5.7.19-17-29.22-log Percona XtraDB Cluster binary (GPL) 5.7.19-29.22, Revision c10027a, wsrep_29.22
         
         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> select count(*) from click_log_20170701;
         +----------+
         | count(*) |
         +----------+
         |  8640000 |
         +----------+
         1 row in set (7.48 sec)
      8. Repeat same for the third node:
        $ ../bin/mysql -uroot -h127.0.0.1 -P13008 test
         Reading table information for completion of table and column names
         You can turn off this feature to get a quicker startup with -A
         
         Welcome to the MySQL monitor.  Commands end with ; or \g.
         Your MySQL connection id is 8
         Server version: 5.7.19-17-29.22-log Percona XtraDB Cluster binary (GPL) 5.7.19-29.22, Revision c10027a, wsrep_29.22
         
         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> select count(*) from click_log_20170701;
         +----------+
         | count(*) |
         +----------+
         |  8640000 |
         +----------+
         1 row in set (8.55 sec)

      ZD ticket #: 207272

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              krunal.bauskar Krunal Bauskar (Inactive)
              Reporter:
              sveta.smirnova Sveta Smirnova
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Smart Checklist