Pavel Ivanov <pivanof@google.com> writes:
Thanks. This patch works for me.
Ok, I'll push it then.
Note that there's also Query_log_event::peek() that should have the same dependency on common_header_len. It's hard (if at all possible) for me to experience that code path in my tests, but for the sake of general correctness I guess it should be fixed in a similar way too.
If you look closely, you will see that Query_log_event::peek_is_commit_rollback() does not depend on the format of the event header - it just looks at the query from the end of the event. This is faster than first parsing the header and then skipping any extra information before the query. We need to call this for _every_ event sent to the slave to check if it is the end of an event group, so it should be fast. So it should be ok without dependency on common_header_len.
Another thing that I noticed looking through the code: in the queue_event() function in case of GTID_EVENT inc_pos doesn't seem to be assigned to anything. Is it a bug or am I missing something?
Yes, looks like a bug, thanks for spotting! - Kristian.