commit 741ff1d99619f170223e51e01efe4d089e292722 Author: Jeremy Cole Date: Thu Jul 11 16:12:02 2013 -0700 Pass through the received event's common_header_len When passing through a Format_description_log_event from a master's binlog through the slave's relay log, the common_header_len field was being overwritten with LOG_EVENT_HEADER_LEN instead of passing through the common_header_len that was received with the event. This would cause relay logs to be corrupted after log rotate events if the master from which the slave was replicating was using a different common_header_len. Change-Id: I882319e6e6c0633bc269fafd7dfc4b1a18c9277d diff --git a/sql/log_event.cc b/sql/log_event.cc index 9cd6523..88b8612 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -4892,7 +4892,7 @@ bool Format_description_log_event::write(IO_CACHE* file) if (!dont_set_created) created= get_time(); int4store(buff + ST_CREATED_OFFSET,created); - buff[ST_COMMON_HEADER_LEN_OFFSET]= LOG_EVENT_HEADER_LEN; + buff[ST_COMMON_HEADER_LEN_OFFSET]= common_header_len; memcpy((char*) buff+ST_COMMON_HEADER_LEN_OFFSET + 1, (uchar*) post_header_len, LOG_EVENT_TYPES); /*