mysqlbinlog cannot read events with numbers, larger than 4G

Bug #1477750 reported by Sveta Smirnova
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL Server
Unknown
Unknown
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.5
Triaged
High
Unassigned
5.6
Triaged
High
Unassigned
5.7
Triaged
High
Unassigned

Bug Description

Even after fix for bug #74734 mysqlbinlog cannot read events with numbers, larger than 4G

How to repeat:
Create event, larger than 4G:

set binlog_format='row';
create table t1(f1 longtext);
insert into t1 values(repeat('a', 1073741824/2));
create table t2 like t1;
flush logs;
insert into t2 select f1 from t1 union all select f1 from t1 union all select f1 from t1 union all select f1 from t1 union all select f1 from t1 union all select f1 from t1 union all select f1 from t1 union all select f1 from t1;

Process binary log with mysqlbinlog using no options, it will succeed:

mysqlbinlog var/mysqld.1/data/master-bin.000002 >tmp.sql

Now find all valied positions:

cat tmp.sql | grep -i at > tmp.sql.cr
cat tmp.sql.cr
# at 4
#150723 22:33:08 server id 1 end_log_pos 120 CRC32 0x62430c0b Start: binlog v 4, server v 5.6.25-73.1-debug-log created 150723 22:33:08
# at 120
/*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
# at 192
# at 238
# at 536871190
# at 1073742142
# at 1610613094
# at 2147484046
# at 2684354998
# at 3221225950
# at 3758096902
# at 4294967854
# at 4294967927
#150723 22:33:11 server id 1 end_log_pos 679 CRC32 0xd83ecaea Rotate to master-bin.000003 pos: 4

Try to read binary log, starting from position 4294967854:

mysqlbinlog var/mysqld.1/data/master-bin.000002 --start-position=4294967854 >tmp.sql
mysqlbinlog: [Warning] option 'start-position': unsigned value 4294967854 adjusted to 4294967295
ERROR: Error in Log_event::read_log_event(): 'read error', data_len: 1633771873, event_type: 97
ERROR: Could not read entry at offset 4294967295: Error in log format or read error.

tags: added: upstream
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-916

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.