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

Extend GTID Binlog Events with Thread Id

    XMLWordPrintable

Details

    Description

      It seems that MySQL 5.6 includes the thread id in the binary log, which can be very handy. It would be nice if MariaDB also did this.

      From MariaDB 10.1.3:

      #150326 12:13:53 server id 1  end_log_pos 407   GTID 0-1-55 trans
      /*!100101 SET @@session.skip_parallel_replication=0*//*!*/;
      /*!100001 SET @@session.gtid_domain_id=0*//*!*/;
      /*!100001 SET @@session.server_id=1*//*!*/;
      /*!100001 SET @@session.gtid_seq_no=55*//*!*/;
      BEGIN
      /*!*/;
      # at 407
      # at 449
      #150326 12:13:53 server id 1  end_log_pos 449   Table_map: `test`.`t1` mapped to number 23
      #150326 12:13:53 server id 1  end_log_pos 487   Write_rows: table id 23 flags: STMT_END_F
       
      BINLOG '
      cVoUVRMBAAAAKgAAAMEBAAAAABcAAAAAAAEABHRlc3QAAnQxAAIDAwAC
      cVoUVRcBAAAAJgAAAOcBAAAAABcAAAAAAAEAAv/8AQAAAAMAAAA=
      '/*!*/;
      ### INSERT INTO `test`.`t1`
      ### SET
      ###   @1=1 /* INT meta=0 nullable=0 is_null=0 */
      ###   @2=3 /* INT meta=0 nullable=1 is_null=0 */
      # at 487
      #150326 12:13:53 server id 1  end_log_pos 514   Xid = 13
      COMMIT/*!*/;
      # at 514

      From MySQL 5.6.22:

      #150326 11:52:25 server id 1  end_log_pos 192 CRC32 0xcf566f36  Query   thread_id=1     exec_time=0     error_code=0
      SET TIMESTAMP=1427395945/*!*/;
      SET @@session.pseudo_thread_id=1/*!*/;
      SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
      SET @@session.sql_mode=1073741824/*!*/;
      SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
      /*!\C utf8 *//*!*/;
      SET @@session.character_set_client=33,@@session.collation_connection=33,@@session.collation_server=8/*!*/;
      SET @@session.lc_time_names=0/*!*/;
      SET @@session.collation_database=DEFAULT/*!*/;
      BEGIN
      /*!*/;
      # at 192
      #150326 11:52:25 server id 1  end_log_pos 238 CRC32 0x85143a10  Table_map: `test`.`t1` mapped to number 72
      # at 238
      #150326 11:52:25 server id 1  end_log_pos 282 CRC32 0xc79c4fe7  Write_rows: table id 72 flags: STMT_END_F
       
      BINLOG '
      aVUUVRMBAAAALgAAAO4AAAAAAEgAAAAAAAEABHRlc3QAAnQxAAIDAwACEDoUhQ==
      aVUUVR4BAAAALAAAABoBAAAAAEgAAAAAAAEAAgAC//wBAAAAAQAAAOdPnMc=
      '/*!*/;
      ### INSERT INTO `test`.`t1`
      ### SET
      ###   @1=1 /* INT meta=0 nullable=0 is_null=0 */
      ###   @2=1 /* INT meta=0 nullable=1 is_null=0 */
      # at 282
      #150326 11:52:25 server id 1  end_log_pos 313 CRC32 0xd6b11791  Xid = 15
      COMMIT/*!*/;
      # at 313

      Attachments

        Issue Links

          Activity

            People

              bnestere Brandon Nesterenko
              kolbe Kolbe Kegel (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              19 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.