Skip to content

FormatDescriptionEvent has zero log_pos #29

Closed
@bjoernhaeuser

Description

@bjoernhaeuser

Hey,

I just updated to the latest commit and since then my tests are failing. It seems to be that the parsing of a FORMAT_DESCRIPTION_EVENT fails and the stream gets a zero log_pos. Subsequent requests will fail, because zero is not a allowed position in the file.

Here is the dump of the binlog:


mysqlbinlog --base64-output=auto --hexdump mysql-bin.000003 
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at 4
#130525 21:42:04 server id 1  end_log_pos 107 
# Position  Timestamp   Type   Master ID        Size      Master Pos    Flags 
#        4 0c 14 a1 51   0f   01 00 00 00   67 00 00 00   6b 00 00 00   00 00
#       17 04 00 35 2e 35 2e 33 31  2d 6c 6f 67 00 00 00 00 |..5.5.31.log....|
#       27 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 |................|
#       37 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 |................|
#       47 00 00 00 00 0c 14 a1 51  13 38 0d 00 08 00 12 00 |.......Q.8......|
#       57 04 04 04 04 12 00 00 54  00 04 1a 08 00 00 00 08 |.......T........|
#       67 08 08 02 00  |....|
#   Start: binlog v 4, server v 5.5.31-log created 130525 21:42:04 at startup
ROLLBACK/*!*/;
BINLOG '
DBShUQ8BAAAAZwAAAGsAAAAAAAQANS41LjMxLWxvZwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAMFKFREzgNAAgAEgAEBAQEEgAAVAAEGggAAAAICAgCAA==
'/*!*/;
# at 107

This is the packet:

binlog_event.event.dump()
print vars(binlog_event)

generates

=== FormatDescriptionEvent ===
Date: 2013-05-25T22:27:33
Event size: 84
Read bytes: 0
()
{'server_id': 1, 'event_type': 15, 'timestamp': 1369513653, 'log_pos': 0, 'charset': 'utf8', 'packet': <pymysql.connections.MysqlPacket object at 0x2ca9b90>, 'read_bytes': 0, 'flags': 0, '_BinLogPacketWrapper__data_buffer': '', 'event': <pymysqlreplication.event.FormatDescriptionEvent object at 0x2ca9d50>, 'event_size': 103}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions