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

Failed CoR in non-atomic mode no longer generates DROP in RBR, replica diverges

    XMLWordPrintable

Details

    Description

      --source include/have_binlog_format_row.inc
      --source include/master-slave.inc
       
      set drop_before_create_or_replace= on;
       
      create table t (a int);
      --error ER_DUP_ENTRY
      create or replace table t (a int primary key) as select 1 as a union all select 1;
      show binlog events;
      show tables;
       
      --sync_slave_with_master
      show tables;
       
      --connection master
      --source include/rpl_end.inc
      

      bb-main-monty 6cb6e8285c50a0bbcb2b599535b8d02b7bba5256

      show binlog events;
      Log_name	Pos	Event_type	Server_id	End_log_pos	Info
      master-bin.000001	4	Format_desc	1	256	Server ver: 12.0.0-MariaDB-debug-log, Binlog ver: 4
      master-bin.000001	256	Gtid_list	1	285	[]
      master-bin.000001	285	Binlog_checkpoint	1	329	master-bin.000001
      master-bin.000001	329	Gtid	1	371	GTID 0-1-1
      master-bin.000001	371	Query	1	469	use `test`; create table t (a int)
      show tables;
      Tables_in_test
      connection slave;
      show tables;
      Tables_in_test
      t
      

      Before MDEV-25292 (Atomic CREATE OR REPLACE), and with MDEV-28933 but in the statement binlog format, the non-atomic CREATE OR REPLACE drops the table, and a DROP event is written into the binary log. But after MDEV-25292, while it still drops the table because of drop_before_create_or_replace, the event is no longer generated, thus the table on the replica remains, and the servers diverge.

      Attachments

        Issue Links

          Activity

            People

              monty Michael Widenius
              elenst Elena Stepanova
              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.