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

Position mismatch in binlog for partial_row_log_events

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 12.3
    • 12.3.1
    • Replication
    • None
    • Not for Release Notes
    • Q1/2026 Server Maintenance

    Description

      MDEV-32570
      Fragment ROW replication events larger than max_packet_size

      Commit : 061fb3be63423429a8e049cd745ab46fbf266418

      Test : rpl_position.test

      --source include/master-slave.inc
       
      CREATE TABLE t1 (id INT PRIMARY KEY, data LONGBLOB);
       
      SET @blob = REPEAT('A', 1 * 1024);
      INSERT INTO t1 VALUES (1, @blob);
       
      SET @blob = REPEAT('A', 10 * 1024);
      INSERT INTO t1 VALUES (2, @blob);
       
      SHOW BINLOG EVENTS;
      
      

      Execute as

      ./mtr  rpl_position.test --mariadbd=--slave-max-allowed-packet=1024 --mariadbd=--binlog-format=ROW
      

      With the patch:

      SHOW BINLOG EVENTS;
      Log_name	Pos	Event_type	Server_id	End_log_pos	Info
      master-bin.000001	4	Format_desc	1	257	Server ver: 12.3.0-MariaDB-debug-log, Binlog ver: 4
      master-bin.000001	257	Gtid_list	1	286	[]
      master-bin.000001	286	Binlog_checkpoint	1	330	master-bin.000001
      master-bin.000001	330	Gtid	1	372	GTID 0-1-1
      master-bin.000001	372	Query	1	499	use `test`; CREATE TABLE t1 (id INT PRIMARY KEY, data LONGBLOB)
      master-bin.000001	499	Gtid	1	541	BEGIN GTID 0-1-2
      master-bin.000001	541	Annotate_rows	1	0	INSERT INTO t1 VALUES (1, @blob)
      master-bin.000001	596	Table_map	1	0	table_id: 33 (test.t1)
      master-bin.000001	643	Partial_rows	1	1126	Fragment 1 of 2
      master-bin.000001	1667	Partial_rows	1	1236	Fragment 2 of 2
      master-bin.000001	1777	Query	1	1850	COMMIT
      master-bin.000001	1850	Gtid	1	1892	BEGIN GTID 0-1-3
      master-bin.000001	1892	Annotate_rows	1	0	INSERT INTO t1 VALUES (2, @blob)
      master-bin.000001	1947	Table_map	1	0	table_id: 33 (test.t1)
      master-bin.000001	1994	Partial_rows	1	1126	Fragment 1 of 11
      master-bin.000001	3018	Partial_rows	1	2150	Fragment 2 of 11
      master-bin.000001	4042	Partial_rows	1	3174	Fragment 3 of 11
      master-bin.000001	5066	Partial_rows	1	4198	Fragment 4 of 11
      master-bin.000001	6090	Partial_rows	1	5222	Fragment 5 of 11
      master-bin.000001	7114	Partial_rows	1	6246	Fragment 6 of 11
      master-bin.000001	8138	Partial_rows	1	7270	Fragment 7 of 11
      master-bin.000001	9162	Partial_rows	1	8294	Fragment 8 of 11
      master-bin.000001	10186	Partial_rows	1	9318	Fragment 9 of 11
      master-bin.000001	11210	Partial_rows	1	10342	Fragment 10 of 11
      master-bin.000001	12234	Partial_rows	1	10740	Fragment 11 of 11
      master-bin.000001	12632	Query	1	12705	COMMIT
      

      Without the patch (base):

      SHOW BINLOG EVENTS;
      Log_name	Pos	Event_type	Server_id	End_log_pos	Info
      master-bin.000001	4	Format_desc	1	256	Server ver: 11.8.6-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	512	use `test`; CREATE TABLE t1 (id INT PRIMARY KEY, data LONGBLOB) engine=innodb
      master-bin.000001	512	Gtid	1	554	BEGIN GTID 0-1-2
      master-bin.000001	554	Annotate_rows	1	0	INSERT INTO t1 VALUES (1, @blob)
      master-bin.000001	609	Table_map	1	0	table_id: 33 (test.t1)
      master-bin.000001	656	Write_rows_v1	1	0	table_id: 33 flags: STMT_END_F
      master-bin.000001	1722	Xid	1	1753	COMMIT /* xid=138 */
      master-bin.000001	1753	Gtid	1	1795	BEGIN GTID 0-1-3
      master-bin.000001	1795	Annotate_rows	1	0	INSERT INTO t1 VALUES (2, @blob)
      master-bin.000001	1850	Table_map	1	0	table_id: 33 (test.t1)
      master-bin.000001	1897	Write_rows_v1	1	0	table_id: 33 flags: STMT_END_F
      master-bin.000001	12179	Xid	1	12210	COMMIT /* xid=140 */
      master-bin.000001	12210	Gtid	1	12252	BEGIN GTID 0-1-4
      master-bin.000001	12252	Annotate_rows	1	0	INSERT INTO t1 VALUES (3, 'c')
      master-bin.000001	12305	Table_map	1	0	table_id: 33 (test.t1)
      master-bin.000001	12352	Write_rows_v1	1	0	table_id: 33 flags: STMT_END_F
      master-bin.000001	12395	Annotate_rows	1	0	INSERT INTO t1 VALUES (4, 'd')
      master-bin.000001	12448	Table_map	1	0	table_id: 33 (test.t1)
      master-bin.000001	12495	Write_rows_v1	1	0	table_id: 33 flags: STMT_END_F
      master-bin.000001	12538	Xid	1	12569	COMMIT /* xid=142 */
      rpl.rpl_position 'row'                   [ fail ]  Found warnings/errors in s
      

      Attachments

        Issue Links

          Activity

            People

              bnestere Brandon Nesterenko
              Deepthi ES Deepthi Eranti Sreenivas
              Brandon Nesterenko Brandon Nesterenko
              Deepthi Eranti Sreenivas Deepthi Eranti Sreenivas
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.