Skip to content

canal.Canal emits an empty e.Header.LogPos event in mariadb 11.4 #1035

Closed
@alarbada

Description

@alarbada

BUG

I originally mentioned this behaviour here.

The LogPos header value is empty, as you will be able to see in the test logs. I've looked into the output of show binlog events in 'mysql-bin.000002' and it shows me this:

Image

I can see that for the Write_rows_v1 event the end_log_pos is 0. The Pos is still non zero though.

I've checked the code here, which I believe is the responsible for parsing the event header, but I think it is fine.

I'm a bit lost on how to continue debugging this. From the docker commands canal.Canal should in theory be able to fill the LogPos, I cannot see any mariadb docs specifying that LogPos is empty:

https://mariadb.com/kb/en/2-binlog-event-header

how to reproduce

I've created a small reproduction example here:

https://github.com/alarbada/go-mysql/tree/mariadb-logpos-bug

Basically, git clone the repo and run this test. There's also docker commands to setup the mysql and mariadb instances.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions