← Back to team overview

maria-developers team mailing list archive

Re: Incorrect format description event skipping in queue_event()


On Wed, Sep 4, 2013 at 3:23 AM, Kristian Nielsen
<knielsen@xxxxxxxxxxxxxxx> wrote:
>> Thanks. This patch works for me.
> Ok, I'll push it then.

I've just noticed that my claim that patch works is based on my tree
which also includes fixes from
https://mariadb.atlassian.net/browse/MDEV-4645, in particular *_3
patch is of notice. So probably you want to review that and push too.

>> 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.

Right, but it checks if event_len < LOG_EVENT_HEADER_LEN +
QUERY_HEADER_LEN. I'm not sure if this will be always false when
common_header_len > LOG_EVENT_HEADER_LEN. Probably just this condition
should be removed as there's check for event_len < 9 anyway.