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

DML events for auto-partitioned tables are written into binary log twice

    XMLWordPrintable

Details

    Description

      --source include/have_partition.inc
      --source include/have_binlog_format_mixed.inc
      --source include/master-slave.inc
       
      create table t1 (a int) with system versioning partition by system_time limit 1000 auto;
      insert into t1 values (1);
      show binlog events;
       
      --sync_slave_with_master
       
      select * from t1;
      --connection master
       
      # cleanup
      drop table t1;
      --source include/rpl_end.inc
      

      bb-10.5-midenok-MENT-654 256d3c1be

      show binlog events;
      Log_name	Pos	Event_type	Server_id	End_log_pos	Info
      master-bin.000001	4	Format_desc	1	256	Server ver: 10.5.1-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	525	use `test`; create table t1 (a int) with system versioning partition by system_time limit 1000 auto
      master-bin.000001	525	Gtid	1	567	BEGIN GTID 0-1-2
      master-bin.000001	567	Query	1	663	use `test`; insert into t1 values (1)
      master-bin.000001	663	Query	1	740	COMMIT
      master-bin.000001	740	Gtid	1	782	GTID 0-1-3
      master-bin.000001	782	Query	1	886	use `test`; insert into t1 values (1)
      connection slave;
      select * from t1;
      a
      1
      1
      

      In case of the row binlog format, first time the event is written in a row format and the second one as a statement (as if it's interpreted as DDL).

      Attachments

        Issue Links

          Activity

            People

              midenok Aleksey Midenkov
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.