Bug #691 mysqlbinlog from 4.0 can't read a binlog produced by a 3.23 mysqld
Submitted: 20 Jun 2003 6:47 Modified: 20 Jun 2003 7:00
Reporter: Guilhem Bichot Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:4.0 OS:Any (all)
Assigned to: Guilhem Bichot CPU Architecture:Any

[20 Jun 2003 6:47] Guilhem Bichot
Description:
See how-to-repeat

How to repeat:
start a 3.23 server with --log-bin, stop it. Run mysqlbinlog from a 4.0 distribution on the 3.23 binlog:
ERROR: Error in Log_event::read_log_event(): 'Found invalid event in binary log', data_len=60,event_type=6
ERROR: Could not read entry at offset 174 : Error in log format or read error
(among other errors)

Suggested fix:
This is wrong in mysqlbinlog.cc (will fix it now):
     event_len = uint4korr(buf + 4);
should be
     event_len = uint4korr(buf + EVENT_LEN_OFFSET);
[20 Jun 2003 7:00] Guilhem Bichot
Thank you for your bug report. This issue has been fixed in the latest
development tree for that product. You can find more information about
accessing our development trees at 
    http://www.mysql.com/doc/en/Installing_source_tree.html

fixed in 4.0 in changeset 1.1539.1.1
[20 Jun 2003 7:02] Guilhem Bichot
by the way, I have tested that this does not break anything: in 3.23 and 4.0 binlogs, the event's length is always at position 9 (EVENT_LEN_OFFSET).