Skip to content
  • Luis Soares's avatar
    774382cf
    BUG#16532543: MYSQLBINLOG + MULTIPLE GTID BINLOGS + MYSQL => UNABLE TO · 774382cf
    Luis Soares authored
    APPLY LOGS: ERROR 1837
    
    When using mysqlbinlog and mysql client to roll forward two (or more)
    binary logs with GTIDs enabled, the server will report an error when
    switching from the first to the second binary log.
    
    This happens because the variable GTID_NEXT is not properly reset when
    the first log file ends. Therefore, when executing the format
    description event of the second log file, GTID_NEXT will still be set
    to the last transaction identifier from the first log. Ultimately,
    this results in the following error: 1837.
    
    The fix is to make mysqlbinlog to output SET
    @@SESSION.GTID_NEXT=AUTOMATIC when processing a non-fake rotate
    event. Furthermore, even though transactions do not span multiple
    binary log files, they can span multiple relay-log files. Therefore,
    the resetting of GTID_NEXT should only occur if mysqlbinlog is not
    handling a rotate event in the middle of a transaction (as it may be
    the case when parsing relay-logs).
    
    In this patch, I also fixed:
      1. a few replace_regex in some .inc files
      2. some result files that had strange results after the defective
         regex kicked in
    774382cf
    BUG#16532543: MYSQLBINLOG + MULTIPLE GTID BINLOGS + MYSQL => UNABLE TO
    Luis Soares authored
    APPLY LOGS: ERROR 1837
    
    When using mysqlbinlog and mysql client to roll forward two (or more)
    binary logs with GTIDs enabled, the server will report an error when
    switching from the first to the second binary log.
    
    This happens because the variable GTID_NEXT is not properly reset when
    the first log file ends. Therefore, when executing the format
    description event of the second log file, GTID_NEXT will still be set
    to the last transaction identifier from the first log. Ultimately,
    this results in the following error: 1837.
    
    The fix is to make mysqlbinlog to output SET
    @@SESSION.GTID_NEXT=AUTOMATIC when processing a non-fake rotate
    event. Furthermore, even though transactions do not span multiple
    binary log files, they can span multiple relay-log files. Therefore,
    the resetting of GTID_NEXT should only occur if mysqlbinlog is not
    handling a rotate event in the middle of a transaction (as it may be
    the case when parsing relay-logs).
    
    In this patch, I also fixed:
      1. a few replace_regex in some .inc files
      2. some result files that had strange results after the defective
         regex kicked in
Loading