[MDEV-24654] GTID event falsely marked transactional on slave Created: 2021-01-22  Updated: 2023-05-09

Status: Stalled
Project: MariaDB Server
Component/s: Replication
Affects Version/s: 10.2, 10.3, 10.4, 10.5
Fix Version/s: 10.4, 10.5

Type: Bug Priority: Major
Reporter: Andrei Elkin Assignee: Andrei Elkin
Resolution: Unresolved Votes: 0
Labels: None


 Description   

GTID event can be falsely marked transactional in few cases including
binary-logging on the slave side upon execution.
A non-transactional group of event from master changes that status through

5753
    int THD::binlog_write_table_map(TABLE *table, bool is_transactional,
5754
                                    my_bool *with_annotate)
5755
    {
5756
      int error;
5757
      DBUG_ENTER("THD::binlog_write_table_map");
5758
      DBUG_PRINT("enter", ("table: %p  (%s: #%lu)",
5759
                           table, table->s->table_name.str,
5760
                           table->s->table_map_id));
5761
 
5762
      /* Ensure that all events in a GTID group are in the same cache */
5763
      if (variables.option_bits & OPTION_GTID_BEGIN)
5764
        is_transactional= 1;

which makes the following logging pattern

#010909  4:46:40 server id #  end_log_pos # CRC32 XXX 	GTID 0-1-3 trans
/*!100001 SET @@session.server_id=1*//*!*/;
/*!100001 SET @@session.gtid_seq_no=3*//*!*/;
START TRANSACTION
/*!*/;
# at #
# at #
#010909  4:46:40 server id #  end_log_pos # CRC32 XXX 	Annotate_rows:
#Q> INSERT INTO t2 VALUES (1,9,1), (2,9,2), (3,9,3), (4,9,4)

from rpl.rpl_blackhole_row_annotate test, where t2 is MyISAM.
The group's GTID on master is without trans tag.



 Comments   
Comment by Andrei Elkin [ 2021-01-22 ]

The patch for review b4aab4d4e7e also in bb-10.3-andrei~1.

Comment by Sergei Golubchik [ 2021-07-23 ]

I failed to find MDEV-24654 commits in any of the branches on github. Does it still exist anywhere?

Comment by Andrei Elkin [ 2021-08-08 ]

Sorry for wiping it out of your sight.
The patch {{ 9ea85a70a7}} is now rebased on 10.2 and pushed into bb-10.2-andrei.

Generated at Thu Feb 08 09:31:38 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.