Documentation Home
MySQL Internals Manual


MySQL Internals Manual  /  ...  /  COM_BINLOG_DUMP_GTID

14.9.6 COM_BINLOG_DUMP_GTID

If the binlog-filename is empty, the server will send the binlog-stream of the first known binlog.

COM_BINLOG_DUMP_GTID:

request the Binlog Network Stream based on a GTID

Payload
1              [1e] COM_BINLOG_DUMP_GTID
2              flags
4              server-id
4              binlog-filename-len
string[len]    binlog-filename
8              binlog-pos
  if flags & BINLOG_THROUGH_GTID {
4              data-size
string[len]    data
  }
Fields
  • flags (2) --

    Flag

    Description

    0x01

    BINLOG_DUMP_NON_BLOCK

    0x02

    BINLOG_THROUGH_POSITION

    0x04

    BINLOG_THROUGH_GTID

  • server_id (4) -- server id of this slave

  • binlog-filename-len (4) -- length of binlog-filename

  • binlog-filename (string.fix_len) -- filename of the binlog on the master

  • binlog_pos (8) -- position in the binlog-file to start the stream with

  • data-len (4) -- length of data

  • data (string.fix_len) -- SID block

    4                n_sids
      for n_sids {
    string[16]       SID
    8                n_intervals
        for n_intervals {
    8                start (signed)
    8                end (signed)
        }
      }
Returns

a Binlog Network Stream, a ERR_Packet or if BINLOG_DUMP_NON_BLOCK is set a EOF_Packet


User Comments
User comments in this section are, as the name implies, provided by MySQL users. The MySQL documentation team is not responsible for, nor do they endorse, any of the information provided here.
  Posted by Florent Guiliani on October 17, 2013
The field n_sids is not 4 bytes but 8 bytes in the MySQL 5.6 source code.
Sign Up Login You must be logged in to post a comment.