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

Blackhole table updates on slave fail when row annotation is enabled

Details

    Description

      How to reproduce:

      $ perl mtr rpl_blackhole_bug --mysqld=--binlog_annotate_row_events=1 --mysqld=--replicate_annotate_row_events=1
      

      Test case:

      source include/master-slave.inc;
      source include/have_blackhole.inc;
       
      call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
       
      # We start with no primary key
      CREATE TABLE t1 (a INT, b INT, c INT);
       
      sync_slave_with_master;
      ALTER TABLE t1 ENGINE=BLACKHOLE;
       
      connection master;
      INSERT INTO t1 VALUES (1,1,1),(2,1,2),(3,1,3),(4,1,4);
      --disable_warnings
      UPDATE t1 SET c = 2 WHERE b = 1;
      --enable_warnings
       
      DROP TABLE t1;
       
      sync_slave_with_master;
      source include/rpl_end.inc;
      

      Output:

      ...
      worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 16000..16019
      rpl.rpl_blackhole_bug 'mix'              [ pass ]    791
      rpl.rpl_blackhole_bug 'row'              [ fail ]
              Test ended at 2016-10-20 17:09:52
      ...
      Replicate_Wild_Ignore_Table	
      Last_Errno	1032
      Last_Error	Could not execute Update_rows_v1 event on table test.t1; Can't find record in 't1', Error_code: 1032; handler error HA_ERR_END_OF_FILE; the event's master log master-bin.000001, end_log_pos 1510
      Skip_Counter	0
      Exec_Master_Log_Pos	1271
      ...
      

      Original test: rpl.rpl_blackhole
      Note: The failure is only triggered if replicate_annotate_row_events is enables as well.

      Attachments

        Issue Links

          Activity

            Make sure that the test case is re-enabled when the bug is fixed.

            elenst Elena Stepanova added a comment - Make sure that the test case is re-enabled when the bug is fixed.
            sujatha.sivakumar Sujatha Sivakumar (Inactive) added a comment - Hello Andrei, Can you please review the changes for MDEV-11094 . Patch is available at:- https://github.com/MariaDB/server/commit/53d0e9217943719b806ef9fa1cac0a699df4839c Test results are available at:- http://buildbot.askmonty.org/buildbot/grid?category=main&branch=bb-10.1-sujatha
            Elkin Andrei Elkin added a comment -

            Sujatha,

            It was a good analysis by you and
            while your attempt to fix must be effective I still recommend to consider a simpler method
            replied along with review notes.

            Cheers,

            Andrei

            Elkin Andrei Elkin added a comment - Sujatha, It was a good analysis by you and while your attempt to fix must be effective I still recommend to consider a simpler method replied along with review notes. Cheers, Andrei

            Fix is pushed into 10.1.41.
            But in 10.2 there are changes in test script like I mentioned below.
            1. rpl_blackhole.test - needs to enabled and its result file needs to be re-recorded.
            2. Newly added test 'rpl_blackhole_row_annotate.test'needs to be improved as the 'mysqlbinlog' tool adds CRC 32 to its output.
            I have implemented all theses and tested in bb-10.2-sujatha
            https://github.com/MariaDB/server/commit/888e170960717dec970669cafa726921de1102ef

            10.3 Merge:-
            =======
            In 10.3 /mysql-test/extra/rpl_tests directory is not available.
            Hence a new file './mysql-test/extra/rpl_tests/rpl_blackhole_basic.test' added as part of fix
            needs to be relocated to /mysql-test/suite/rpl/include and the tests needs to updated.
            The patch is tested on bb-10.3-sujatha.
            https://github.com/MariaDB/server/commit/9969eae1338da9ebf7eec7bc62c53be2efb70635

            sujatha.sivakumar Sujatha Sivakumar (Inactive) added a comment - Fix is pushed into 10.1.41. But in 10.2 there are changes in test script like I mentioned below. 1. rpl_blackhole.test - needs to enabled and its result file needs to be re-recorded. 2. Newly added test 'rpl_blackhole_row_annotate.test'needs to be improved as the 'mysqlbinlog' tool adds CRC 32 to its output. I have implemented all theses and tested in bb-10.2-sujatha https://github.com/MariaDB/server/commit/888e170960717dec970669cafa726921de1102ef 10.3 Merge:- ======= In 10.3 /mysql-test/extra/rpl_tests directory is not available. Hence a new file './mysql-test/extra/rpl_tests/rpl_blackhole_basic.test' added as part of fix needs to be relocated to /mysql-test/suite/rpl/include and the tests needs to updated. The patch is tested on bb-10.3-sujatha. https://github.com/MariaDB/server/commit/9969eae1338da9ebf7eec7bc62c53be2efb70635

            People

              sujatha.sivakumar Sujatha Sivakumar (Inactive)
              nirbhay_c Nirbhay Choubey (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.