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

GTID event falsely marked transactional on slave

Details

    • Bug
    • Status: Stalled (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5
    • 10.5
    • Replication
    • 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.

      Attachments

        Activity

          People

            Elkin Andrei Elkin
            Elkin Andrei Elkin
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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